/* public/css/style.css */
/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #343a40;
  background-color: #f4f6f9;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  text-decoration: none;
  overflow-x: hidden;
  width: 100%;
}

a:hover {
  text-decoration: underline;
}

/* General Layout */

/* Dashboard Container & Sidebar */
.company-dashboard-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding-top: 2rem; /* Give some space from header */
    padding-bottom: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

.dashboard-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Subtle shadow */
    position: sticky;
    top: 100px; /* Below fixed header */
    padding: 1.5rem;
    align-self: flex-start; /* Important for sticky */
    z-index: 900;
}

/* Dashboard Nav (Desktop Defaults) */
@media (min-width: 992px) {
    .dashboard-nav {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent; /* Prevent layout jump */
}

.dashboard-nav-link:hover,
.dashboard-nav-link.active {
    background-color: #e7f1ff;
    color: #007bff;
    font-weight: 500;
}

.dashboard-nav-link .material-icons {
    margin-right: 0.75rem;
    color: #6c757d;
    font-size: 24px;
}

.dashboard-nav-link.active .material-icons {
    color: #007bff;
}

.dashboard-content {
    flex-grow: 1;
    min-width: 0; /* Important for flex child truncation */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Dashboard Card Styles */
.dashboard-card {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin-bottom: 0; /* Grid handles gap */
}

.dashboard-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-card-title {
    margin-bottom: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.dashboard-card-title .material-icons {
    margin-right: 0.5rem;
    font-size: 1.4rem;
    color: #495057;
}

.dashboard-card-body {
    padding: 1.5rem;
}

/* Info Row Styles (migrated from dashboard.css) */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1.25rem; /* Horizontal padding for mobile */
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #6b7280;
    font-weight: 500;
}

.info-value {
    color: #111827;
    font-weight: 500;
    text-align: right;
}

/* Ensure raw content in cards has padding */
.dashboard-card .p-2 {
    padding: 1.25rem !important; /* Force padding for description/raw text blocks */
}

/* Dashboard Grid Layout (Moved from dashboard.css for global use) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dashboard-grid-full {
    grid-column: 1 / -1;
}

.company-header-card {
    margin-bottom: 1.5rem; /* Ensure space below header */
}

/* Ensure container has proper padding on mobile */
@media (max-width: 991.98px) {
    .dashboard-grid {
        display: flex; /* Stack vertically on mobile */
        flex-direction: column;
        gap: 1.5rem;
    }
}

.page-wrapper {
  display: block;
  /* Changed from flex */
  flex-grow: 1;
  /* Allows page-wrapper to expand and push footer down */
  /* min-height: 100vh; Removed as body and flex-grow handle this */
  /* overflow-x: hidden; REMOVED to fix sticky sidebar */
  width: 100%;
}

@media (max-width: 991.98px) {
    .page-wrapper {
        overflow-x: hidden; /* Prevent horizontal scroll on mobile */
    }
}



/* Main Content */
.main-content {
  /* flex-grow: 1; Removed as page-wrapper handles filling space */
  padding-top: 170px;
  background-color: #eff3f9;
  /* min-height: 100vh; Removed as page-wrapper and body handle this */
}

@media (max-width: 991.98px) {
    .main-content {
        padding-top: 140px; /* Adjust for mobile header height */
    }
}


.content-inner {
  padding: 25px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 5px;
  /* Increased from 5px to 15px to offset Bootstrap row margins */
  padding-right: 5px;
  /* Increased from 5px to 15px to offset Bootstrap row margins */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #212529;
}

h1 {
  font-size: 2.25rem;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

/* Card component */
.card {
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.25rem;
  margin-bottom: 0;
  /*background-color: #f8f9fa;*/
  border-bottom: 1px solid #dee2e6;
}

.card-header h2,
.card-header h3 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

.card-body {
  padding: 1.25rem;
}

/* Buttons */
.button,
button,
.btn {
  /* Added .btn for Bootstrap compatibility */
  display: inline-block;
  font-weight: 500;
  /* color: #212529; Default color can be inherited or set by specific classes */
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  /*background-color: transparent;*/
  border: 1px solid transparent;
  padding: 0.625rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.button-primary,
.btn-primary {
  /* Added .btn-primary */
  color: #fff !important;
  /* Ensure text color is white */
  background-color: #2e72ed;
  border-color: #2e72ed;
}

.button-primary:hover,
.btn-primary:hover {
  /* Added .btn-primary:hover */
  color: #fff !important;
  background-color: #2862cf;
  border-color: #2862cf;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.button-secondary,
.btn-secondary {
  /* Added .btn-secondary */
  color: #fff !important;
  background-color: #6c757d;
  border-color: #6c757d;
}

.button-secondary:hover,
.btn-secondary:hover {
  /* Added .btn-secondary:hover */
  color: #fff !important;
  background-color: #545b62;
  border-color: #4e555b;
}

.button-danger,
.btn-danger {
  /* Added .btn-danger */
  color: #fff !important;
  background-color: #dc3545;
  border-color: #dc3545;
}

.button-danger:hover,
.btn-danger:hover {
  /* Added .btn-danger:hover */
  color: #fff !important;
  background-color: #bd2130;
  border-color: #b21f2d;
}

.button-outline {
  color: #007bff;
  border-color: #007bff;
}

.button-outline:hover {
  color: #fff;
  background-color: #007bff;
}

.button.button-small,
.btn.btn-sm {
  /* Added .btn.btn-sm */
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 4px;
}

.button.full-width {
  display: block;
  width: 100%;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #495057;
}

.form-control {
  /* Generic class for form inputs, similar to Bootstrap */
  display: block;
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
  /* Using .form-control styles now */
}

.form-group input[type="file"] {
  padding: 0.5rem 0.75rem;
  /* Keep specific padding for file inputs if needed */
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-control:focus,
/* Updated to use .form-control */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #007bff;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-error {
  color: #dc3545;
  font-size: 0.875em;
  margin-top: 0.25rem;
}

.form-group .is-invalid,
.is-invalid {
  /* Added .is-invalid for general use */
  border-color: #dc3545 !important;
}

.form-actions {
  margin-top: 2rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

fieldset {
  border: 1px solid #dee2e6;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
}

legend {
  font-weight: 600;
  padding: 0 0.75rem;
  font-size: 1.1rem;
  color: #495057;
}

/* Tables */
table {
  width: 100%;
  margin-bottom: 1rem;
  color: #212529;
  border-collapse: collapse;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

table th,
table td {
  padding: 0.75rem;
  vertical-align: top;
  border-bottom: 1px solid #dee2e6;
}

table thead th {
  vertical-align: bottom;
  background-color: #f8f9fa;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
}

table tbody tr:hover {
  background-color: #f8f9fa;
}

.logo-thumbnail {
  max-width: 70px;
  max-height: 40px;
  object-fit: contain;
  border: 1px solid #dee2e6;
  padding: 2px;
  border-radius: 4px;
}

.logo-thumbnail-placeholder {
  width: 70px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  color: #6c757d;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

/* Alerts */
.alert {
  position: relative;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  border-left: 4px solid;
}

.alert.flash-message {
  margin-bottom: 1.5rem;
}

.alert-success {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #badbcc;
  border-left-color: #198754;
}

.alert-danger {
  color: #842029;
  background-color: #f8d7da;
  border-color: #f5c2c7;
  border-left-color: #dc3545;
}

.alert-info {
  color: #055160;
  background-color: #cff4fc;
  border-color: #b6effb;
  border-left-color: #0dcaf0;
}

/* Auth forms */
.auth-form {
  max-width: 420px;
  margin: 2rem auto;
  padding: 2.5rem;
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.auth-form h2 {
  margin-bottom: 1.5rem;
  text-align: center;
  color: #212529;
}

.auth-form p {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9em;
  color: #6c757d;
}

/* Company view */
.company-profile-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.company-logo-view {
  max-width: 150px;
  max-height: 100px;
  object-fit: contain;
  margin-right: 20px;
  border: 1px solid #eee;
  padding: 8px;
  border-radius: 8px;
  background-color: #fff;
}

.company-logo-placeholder-view {
  width: 150px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
  color: #6c757d;
  background-color: #f8f9fa;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-right: 20px;
}

@media (max-width: 991.98px) {
  /* Renamed to match view.php or include both if uncertain. view.php uses .company-header-card */
  .company-profile-header,
  .company-header-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    align-items: center !important;
  }

  /* Override bootstrap text-end class on mobile */
  .company-profile-header .text-end,
  .company-header-card .text-end {
    text-align: center !important;
    align-items: center !important;
    width: 100%; /* Ensure full width for centering */
  }
  
  /* Ensure flex containers inside header also stack or center */
  .company-profile-header .d-flex.flex-column,
  .company-header-card .d-flex.flex-column {
    align-items: center !important;
    width: 100%;
  }

  .company-logo-view,
  .company-logo-placeholder-view,
  .company-header-card .company-logo {
    margin-right: 0 !important; /* Override inline styles if any */
    margin-bottom: 0.5rem;
    width: 150px !important; /* Force good size on mobile */
    height: auto !important;
  }

  .company-profile-header h1,
  .company-header-card h1 {
    font-size: 1.75rem; /* Smaller font on mobile */
    word-break: break-word; /* Prevent overflow of long words */
    text-align: center !important; /* Ensure styling sticks */
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* Stack dashboard sidebar/content */
  .dashboard-sidebar {
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
      margin-top: 0;
      margin-bottom: 0.5rem; /* Minimal margin */
      position: sticky !important; /* STICKY */
      top: 0px !important; /* Adjusted for sticky header (logo bar only) */
      order: -1; 
      z-index: 100 !important; /* Above content */
      padding: 0.5rem !important; /* Very compact padding */
      box-sizing: border-box !important;
      background: #fff;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  /* Ensure proper padding for cards on mobile */
  .dashboard-card-body,
  .company-header-card,
  .dashboard-card {
      padding: 1.25rem !important; /* Force padding */
  }
  
  .company-dashboard-container {
      flex-direction: column;
      padding-top: 0 !important; /* Remove excess padding, main-content handles header spacing */
      padding-left: 0px !important; /* Minimized padding for space */
      padding-right: 0px !important;
      gap: 1rem;
      width: 100% !important;
      max-width: 100vw !important;
      overflow-x: hidden; /* Prevent container itself from causing scroll */
      align-items: stretch !important; /* Ensure items fill width */
  }

  /* Dashboard Nav Grid on Mobile - Compact Row */
  .dashboard-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 0.5rem; 
  }

  .dashboard-nav-link {
    display: flex;
    flex-direction: row; /* Horizontal layout */
    align-items: center;
    justify-content: center; /* Center content */
    text-align: left;
    padding: 0.4rem 0.5rem; /* Small padding */
    border: 1px solid #e9ecef;
    border-radius: 6px;
    height: auto; 
    font-size: 0.8rem; /* Compact font */
    color: #495057;
    margin-bottom: 0 !important;
    text-decoration: none;
    background-color: #f8f9fa;
    width: 100%;
  }
  
  .dashboard-nav-link .material-icons {
    margin-bottom: 0;
    margin-right: 6px !important; /* Space between icon and text */
    font-size: 18px; /* Smaller icons */
    color: #007bff;
  }
  
  .dashboard-nav-link.active {
    background-color: #e7f1ff;
    color: #007bff;
    border-color: #b6d4fe;
    font-weight: 600;
  }
  
  /* Fix Action Buttons below nav */
  /* Fix Action Buttons below nav */
  .dashboard-sidebar .mt-4 {
    margin-top: 0.5rem !important; /* Less top margin */
    padding-top: 0.5rem !important;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns for actions */
    gap: 0.25rem;
  }
  
  .dashboard-sidebar .mt-4 h6 {
      grid-column: 1 / -1; /* Header spans full width */
      margin-bottom: 0.5rem;
      padding-left: 0 !important;
      text-align: center;
  }

  .dashboard-sidebar .mt-4 button,
  .dashboard-sidebar .mt-4 a {
    text-align: center !important;
    justify-content: center; 
    border: 1px solid #e9ecef !important;
    border-radius: 6px;
    padding: 0.5rem;
    background-color: #fff !important;
    font-size: 0.85em;
  }
  
  .dashboard-sidebar .mt-4 button .material-icons,
  .dashboard-sidebar .mt-4 a .material-icons {
      font-size: 18px;
      margin-right: 4px;
  }
}

.company-profile-header h1,
.company-header-card h1 {
  margin-bottom: 0;
}

.company-profile-details p {
  margin-bottom: 0.75rem;
}

.company-profile-details strong {
  min-width: 150px;
  display: inline-block;
  font-weight: 600;
  color: #495057;
}

.actions-bar {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Footer */
footer {
  margin-top: auto;
  /* Pushes footer to bottom if content is short */
  padding: 2rem 0;
  background-color: #343a40;
  /* Darker footer */
  color: #f8f9fa;
  /* Lighter text for dark footer */
  text-align: center;
  font-size: 0.9em;
  border-top: 3px solid #007bff;
  /* Accent border */
}

footer p {
  margin-bottom: 0;
}

/* Styles for view.php with icons */
.field-with-icon {
  display: flex;
  align-items: center;
  margin-bottom: 0.5em;
}

.field-with-icon .material-icons {
  margin-right: 8px;
  font-size: 1.2em;
  vertical-align: middle;
}

.company-profile-details h3 .material-icons {
  margin-right: 4px;
  font-size: 1.5em;
}

/* Search Suggestions Styles */
.search-suggestions-container {
  position: absolute;
  top: 100%;
  /* left: 0; Will be handled by specific IDs */
  /* width: 100%; Will be handled by specific IDs */
  background-color: #fff;
  border-top: none;
  z-index: 1000;
  text-align: left;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  max-height: 250px;
  overflow-y: auto;
  display: none;
  /* Changed from flex !important */
  flex-direction: column;
  box-sizing: border-box;
  /* Important for width calculation */
}

/* #nav-search-suggestions-container {
    left: 0;
    width: 100%;
} */

#home-search-suggestions-container {
  width: 50%;
  /* Matches the w-50 class on the #home-search-input */
  left: 25%;
  /* (100% - 50% width) / 2, to center it */
}

.search-suggestions-container .suggestion-item {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95em;
  color: #333;
}

.search-suggestions-container .suggestion-item:last-child {
  border-bottom: none;
}

.search-suggestions-container .suggestion-item:hover {
  background-color: #e9e9e9;
  color: #000;
}

/* New Header Search Styles */
#nav-search-form .header-search-field {
  padding: 8px 10px;
  border: 1px solid #ccd1d9;
  font-family: "Arvo", "Helvetica Neue", Helvetica, arial, sans-serif;
  font-weight: 400;
  color: #3e8ce0;
  border-radius: 3px;
  margin-bottom: 0;
  /* Ensure suggestions can appear directly below */
}

#nav-search-form .header-term-list {
  list-style: none inside;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  width: 100%;
  /* Make it full width of the form/input's container */
  margin: 0;
  padding: 5px 10px 0;
  text-align: left;
  color: #777;
  background-color: #fff;
  border: 1px solid #ccd1d9;
  border-top: none;
  font-family: "Arvo", "Helvetica Neue", Helvetica, arial, sans-serif;
  font-weight: 400;
  border-radius: 0 0 3px 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-height: 250px;
  overflow-y: auto;
}

#nav-search-form .header-term-list.hidden {
  display: none;
}

#nav-search-form .header-term-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

#nav-search-form .header-term-list li:last-child {
  border-bottom: none;
}

#nav-search-form .header-term-list li strong {
  color: #444;
  font-weight: 700;
}

#nav-search-form .header-term-list li.selected {
  background-color: #37bc9b;
  color: #fff;
}

#nav-search-form .header-term-list li.selected strong {
  color: #fff;
}

/* Styles for buttons with Material Icons */
.button .material-icons,
button .material-icons,
.btn .material-icons {
  /* Added .btn */
  margin-right: 6px;
  vertical-align: middle;
  font-size: 1.2em;
  line-height: 1;
}

.button.button-small .material-icons,
.btn.btn-sm .material-icons {
  /* Added .btn.btn-sm */
  font-size: 1.1em;
  margin-right: 4px;
}

.button.icon-only .material-icons,
.btn.icon-only .material-icons {
  /* Added .btn.icon-only */
  margin-right: 0;
}

.button.icon-only,
.btn.icon-only {
  /* Added .btn.icon-only */
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/* Custom Bootstrap Header Styles */
header.p-3.mb-3.border-bottom {
  background-color: #ffffff;
  /* White background for header */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  /* Subtle shadow */
  position: fixed;
  width: 100%;
  z-index: 2;
}

header .fs-4 {
  color: #007bff;
}

header .nav-link {
  font-weight: 500;
}

header .nav-link.link-secondary {
  font-weight: 700;
}

header .form-control {
  min-width: 220px;
}

#nav-search-form {
  position: relative;
}

#home-search-form {
  position: relative;
}

#mobile-nav-search-form {
  position: relative;
}

/* Company View Page - Details List Icons */
.details-list dd .material-icons {
  font-size: 1.2em;
}

.details-list dt {
  margin-bottom: 0.35rem;
  padding-top: 0.15rem;
}

.details-list dd {
  margin-bottom: 0.5rem;
}

/* Company Feedback Section */
.company-feedback-section .list-group-item {
  background-color: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.375rem;
  padding: 1rem 1.25rem;
}

.company-feedback-section .list-group-item h5 {
  font-weight: 600;
}

.company-feedback-section .list-group-item small {
  color: #6c757d;
}

.company-feedback-section .list-group-item .material-icons {
  font-size: 1.25rem;
  vertical-align: middle;
}

.leave-feedback-form {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 0.375rem;
  margin-top: 2rem;
}

.leave-feedback-form .form-label {
  font-weight: 500;
}

/* Star Rating Input in Feedback Form */
.star-rating-input {
  display: flex;
  /* Align stars in a row */
  align-items: center;
  margin-top: 4px;
  /* A little space above stars */
}

.star-rating-input .star.material-icons {
  font-size: 2rem;
  /* Make stars a bit larger for input */
  cursor: pointer;
  margin-right: 3px;
  /* Space between stars */
  color: #ccc;
  /* Default color for empty (star_border) icons */
  transition: color 0.2s ease-in-out;
}

.star-rating-input .star.material-icons:hover {
  color: orange;
  /* Highlight on hover */
}

.site-logo {
  max-height: 40px;
  width: auto;
  max-width: 100%;
  margin-right: 10px;
  vertical-align: middle;
}

/* Mobile Header Specific Styles */
.site-logo-mobile {
  max-height: 40px;
  /* As specified */
  width: auto;
  vertical-align: middle;
}

.mobile-user-menu .material-icons {
  font-size: 32px;
  /* As specified in the HTML construction */
  vertical-align: middle;
}

/* Hamburger Icon Styles */
#hamburger-variant-4 {
  width: 30px;
  /* Adjust size as needed */
  height: 22px;
  /* Adjust size as needed */
  position: relative;
  cursor: pointer;
  display: inline-block;
  /* Or flex, if needed for alignment */
  /* margin: 10px; /* Optional: for spacing */
}

#hamburger-variant-4 .line {
  display: block;
  position: absolute;
  height: 3px;
  /* Line thickness */
  width: 100%;
  background: #343a40;
  /* Line color, match with site text */
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

/* Position of lines */
#hamburger-variant-4 .line:nth-child(1) {
  top: 0px;
}

#hamburger-variant-4 .line:nth-child(2) {
  top: 9px;
  /* (Height - LineThickness) / 2 */
}

#hamburger-variant-4 .line:nth-child(3) {
  top: 18px;
  /* Height - LineThickness */
}

/* ========================================= */
/*          NEW HOME PAGE STYLES             */
/* ========================================= */

/* Hero Section */
.hero-section {
  background-color: #e9ecef;
  /* Subtle background color */
  padding-top: 4rem;
  /* py-5 equivalent */
  padding-bottom: 4rem;
  /* py-5 equivalent */
  text-align: center;
  /* text-center equivalent */
}

.hero-section h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 1rem;
}

.hero-section p.lead {
  font-size: 1.25rem;
  color: #495057;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Search Form Specifics */
.hero-section .home-search-section {
  margin-top: 2rem;
  /* mt-4 equivalent */
}

.hero-section .search-form {
  display: flex;
  justify-content: center;
  align-items: center;
  /* Vertically align items if button is different height */
}

.hero-section .search-input-field.form-control-lg {
  /* form-control form-control-lg w-50 */
  max-width: 50%;
  /* w-50 */
  height: calc(1.5em + 1rem + 2px);
  /* form-control-lg height */
  padding: 0.5rem 1rem;
  /* form-control-lg padding */
  font-size: 1.25rem;
  /* form-control-lg font-size */
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero-section .search-submit-button.btn-primary {
  /* button search-submit-button btn btn-primary ms-2 */
  height: calc(1.5em + 1rem + 2px);
  /* Match input height */
  padding: 0.5rem 1.5rem;
  font-size: 1.25rem;
  /* Match input font-size */
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px;
  /* Overlap border */
  box-shadow: 0 2px 10px rgba(0, 123, 255, 0.2);
}

.hero-section .search-submit-button.btn-primary .material-icons {
  font-size: 1.5rem;
  /* Adjust icon size within button */
  margin-right: 0;
  /* No text next to it */
}

/* Benefits Section */
.site-benefits {
  /* py-5 bg-light */
  padding-top: 4rem;
  padding-bottom: 4rem;
  background-color: #f8f9fa;
  /* bg-light */
}

.site-benefits h2 {
  /* text-center mb-5 */
  text-align: center;
  margin-bottom: 3rem !important;
  /* mb-5 */
  font-size: 2rem;
  font-weight: 600;
}

.benefit-item {
  /* text-center p-3 */
  text-align: center;
  padding: 1.5rem;
  /* p-3 */
  margin-bottom: 1.5rem;
  /* Add some space between items on mobile */
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
  /* material-icons fs-1 mb-3 d-block */
  font-size: 3rem !important;
  /* fs-1 */
  margin-bottom: 1rem !important;
  /* mb-3 */
  display: block;
  /* d-block */
  color: #007bff;
  /* Primary color for icons */
}

.benefit-item h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #343a40;
}

.benefit-item p {
  font-size: 0.95rem;
  color: #6c757d;
  line-height: 1.5;
}

/* Top Rated Companies Section */
.top-companies-section {
  /* py-5 */
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.top-companies-section h2 {
  /* text-center mb-4 */
  text-align: center;
  margin-bottom: 2rem !important;
  /* mb-4 */
  font-size: 2rem;
  font-weight: 600;
}

.top-companies-section .list-group-item {
  background-color: #fff;
  /* Ensure white background */
  border: 1px solid #e9ecef;
  /* Light border */
  border-radius: 0.375rem;
  /* Standard Bootstrap card radius */
  margin-bottom: 0.75rem;
  /* Space between items */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  /* Subtle shadow */
  transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
  /* Added transform to transition */
  /* Assuming padding is handled by Bootstrap's .list-group-item or inherited, adjust if needed */
}

.top-companies-section .list-group-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  /* Enhanced shadow on hover */
  transform: translateY(-2px);
  /* Slight lift effect */
}

.top-companies-section .list-group-item a {
  font-weight: 500;
}

.top-companies-section .badge.bg-primary {
  font-size: 0.9em;
  padding: 0.6em 0.8em;
}

/* Responsive Adjustments for New Home Page Sections */

/* Tablets and below */
@media (max-width: 991.98px) {
  .hero-section h1 {
    font-size: 2.4rem;
  }

  .hero-section p.lead {
    font-size: 1.15rem;
  }

  .hero-section .search-input-field.form-control-lg,
  .hero-section #home-search-suggestions-container {
    max-width: 70%;
    /* Increase width for search on tablets */
  }

  .benefit-item {
    margin-bottom: 2rem;
  }
}

/* Mobile phones */
@media (max-width: 767.98px) {
  .hero-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p.lead {
    font-size: 1rem;
  }

  .hero-section .search-form {
    flex-direction: column;
    /* Stack search input and button */
  }

  .hero-section .search-input-field.form-control-lg {
    max-width: 90%;
    /* Full width for search input */
    margin-bottom: 0.5rem;
    border-radius: 6px !important;
    /* Reset split radius */
  }

  .hero-section .search-submit-button.btn-primary {
    width: 90%;
    /* Full width for search button */
    margin-left: 0;
    border-radius: 6px !important;
    /* Reset split radius */
  }

  .hero-section #home-search-suggestions-container {
    max-width: 90%;
    /* Match input width */
  }

  .site-benefits {
    padding-top: 3rem;
    padding-bottom: 2rem;
    /* Less padding if items have margin */
  }

  .site-benefits h2,
  .top-companies-section h2 {
    font-size: 1.75rem;
  }

  .benefit-item {
    padding: 1.25rem;
  }

  .benefit-icon {
    font-size: 2.5rem !important;
  }

  .benefit-item h3 {
    font-size: 1.25rem;
  }

  .top-companies-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

@media (max-width: 575.98px) {
  .hero-section h1 {
    font-size: 1.8rem;
  }

  .hero-section p.lead {
    font-size: 0.95rem;
  }

  .hero-section .search-input-field.form-control-lg,
  .hero-section .search-submit-button.btn-primary,
  .hero-section #home-search-suggestions-container {
    max-width: 100%;
    /* Full width */
    width: 100%;
  }

  .hero-section .search-input-field.form-control-lg,
  .hero-section .search-submit-button.btn-primary {
    font-size: 1rem;
    /* Slightly smaller font for inputs on small screens */
    height: auto;
    /* Let padding define height */
  }

  .hero-section .search-submit-button.btn-primary .material-icons {
    font-size: 1.3rem;
  }

  .site-benefits h2,
  .top-companies-section h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem !important;
  }

  .benefit-item {
    padding: 1rem;
  }

  .benefit-icon {
    font-size: 2.2rem !important;
  }

  .benefit-item h3 {
    font-size: 1.15rem;
  }

  .benefit-item p {
    font-size: 0.9rem;
  }
}

/*
@media (max-width: 991.98px) { /* Bootstrap's lg breakpoint (screens smaller than 992px) */
#nav-search-suggestions-container {
  display: none !important;
}

*/
/* Utility classes (ensure these are not duplicated if already present) */
/* .text-center { text-align: center; } - Already in Bootstrap or previous CSS */
/* .py-5 { padding-top: 3rem; padding-bottom: 3rem; } - Handled custom or via Bootstrap */
/* .bg-light { background-color: #f8f9fa; } - Handled custom or via Bootstrap */
/* .fs-1 { font-size: calc(1.375rem + 1.5vw); } @media (min-width: 1200px) { .fs-1 { font-size: 2.5rem; } } - Handled custom */
/* .mb-3 { margin-bottom: 1rem; } - Handled custom or via Bootstrap */
/* .d-block { display: block; } - Handled custom or via Bootstrap */

/* Ensure footer is always at the bottom */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-wrapper {
  flex-grow: 1;
  background-color: #eff3f9;
}

/* Final check on button and form control consistency */
.btn,
.button {
  /* Ensure any specific .btn styles from Bootstrap are complemented by .button if used interchangeably */
}

.form-control {
  /* Ensure any specific .form-control styles from Bootstrap are reflected */
}

/* Ensure Material Icons are loaded and display correctly */
.material-icons {
  font-family: "Material Icons";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  /* Preferred icon size */
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;

  /* Support for all WebKit browsers. */
  -webkit-font-smoothing: antialiased;
  /* Support for Safari and Chrome. */
  text-rendering: optimizeLegibility;

  /* Support for Firefox. */
  -moz-osx-font-smoothing: grayscale;

  /* Support for IE. */
  font-feature-settings: "liga";
}

/* Ensure Bootstrap dropdowns are above other elements, including search suggestions */
.dropdown-menu {
  z-index: 1051;
  /* Bootstrap's default for modals is 1050, so 1051 should be safe for dropdowns above most other content */
}

.button-copy {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 5px;
  vertical-align: middle;
}

.button-copy .material-icons {
  font-size: 18px;
  color: #555;
}

.button-copy:hover .material-icons {
  color: #000;
}

/* Admin Area Specific Styles */
.admin-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.admin-table {
  border-collapse: separate;
  border-spacing: 0 15px;
}

.admin-table tbody tr {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border-radius: 5px;
}

.admin-table td:first-child {
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}

.admin-table td:last-child {
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}

.admin-edit-form .form-label {
  font-weight: 600;
}/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Allow clicking through container */
}

.toast-notification {
    background-color: #fff;
    color: #333;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto; /* Enable clicks on toasts */
    animation: toastSlideIn 0.3s ease-out forwards;
    border-left: 5px solid #2e72ed; /* Default Primary Color */
    font-size: 0.95rem;
    font-weight: 500;
}

.toast-notification.success {
    border-left-color: #198754;
}

.toast-notification.error {
    border-left-color: #dc3545;
}

.toast-notification.info {
    border-left-color: #0dcaf0;
}

.toast-notification .material-icons {
    font-size: 24px;
}

.toast-notification.success .material-icons {
    color: #198754;
}

.toast-notification.error .material-icons {
    color: #dc3545;
}

.toast-notification.info .material-icons {
    color: #0dcaf0;
}

.toast-notification.hiding {
    animation: toastFadeOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Dropdown Navigation Hover Support */
@media (min-width: 992px) {
    .dropdown-nav {
        position: relative;
        display: inline-block;
        height: 100%; /* Align with other nav items */
    }

    .dropdown-nav .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: 0;
        background-color: #fff;
        border: 1px solid #dee2e6;
        border-radius: 0.25rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
        min-width: 200px;
        z-index: 1000;
        padding: 0.5rem 0;
    }

    /* Show on hover */
    .dropdown-nav:hover .dropdown-menu,
    .dropdown-nav .dropdown-menu:hover {
        display: block;
    }
    
    .dropdown-nav .dropdown-menu a {
        display: block;
        padding: 0.5rem 1rem;
        color: #212529;
        text-decoration: none;
        white-space: nowrap;
    }

    .dropdown-nav .dropdown-menu a:hover {
        background-color: #f8f9fa;
        color: #007bff;
    }
    
    /* Ensure parent link looks like a link */
    .dropdown-nav > .dropdown-toggle {
        display: flex; /* Or inline-block depending on nav layout */
        align-items: center;
        /* Inherit or match main-nav a styles */
        color: #343a40; /* Assuming default nav color from context or style.css */
        text-decoration: none;
        padding: 0.5rem 1rem; /* Adjust to match main-nav links */
        height: 100%;
    }
    
    .dropdown-nav:hover > .dropdown-toggle {
        color: #007bff; /* Active/Hover color */
    }
}

/* ========================================= */
/*           DARK MODE SWITCHER              */
/* ========================================= */

/* Fix for Job Ads and General Text in Dark Mode */
[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-secondary {
    color: #a0a0a0 !important;
}

[data-bs-theme="dark"] .text-dark {
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .job-description,
[data-bs-theme="dark"] .card-body {
    color: #e0e0e0;
}

/* Ensure links in dark mode */
[data-bs-theme="dark"] a.text-secondary:hover {
    color: #fff !important;
}

/* Fix Dashboard Card Headers and Content */
[data-bs-theme="dark"] .dashboard-card,
[data-bs-theme="dark"] .company-header-card,
[data-bs-theme="dark"] .card {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .dashboard-card-header {
    background-color: transparent !important;
    border-bottom: 1px solid #333 !important;
}

[data-bs-theme="dark"] .dashboard-card-title,
[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2, [data-bs-theme="dark"] h3, 
[data-bs-theme="dark"] h4, [data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6 {
    color: #fff !important;
}

/* Fix Tables in Dark Mode */
[data-bs-theme="dark"] .table {
    color: #e0e0e0 !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Fix List Groups */
[data-bs-theme="dark"] .list-group-item {
    background-color: transparent !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .list-group-item-action:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Fix Forms */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #2d2d2d !important;
    border-color: #444 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #333 !important;
    border-color: #3b82f6 !important;
    color: #fff !important;
}

/* Fix Copyable Text and Specific Labels */
[data-bs-theme="dark"] .copyable-text,
[data-bs-theme="dark"] .text-dark {
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #a0a0a0 !important;
}


/* CodePen Theme Switcher */
.switch {
  width: 300px;
  height: 140px;
  display: block;
  position: relative;
  transform: scale(0.25);
  transform-origin: top center;
  margin-bottom: -105px; /* Compensate for scale */
}

.switch__background,
.switch__background:before,
.switch__background:after {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
}

.switch__background {
  border-radius: 70px;
  -webkit-box-shadow: 0 35px 70px -16px rgba(32,15,55,0.3);
  box-shadow: 0 35px 70px -16px rgba(32,15,55,0.3);
  transition: box-shadow 0.8s;
  overflow: hidden;
}

.switch__background:before {
  content: '';
  background: linear-gradient(#200f37, #272065);
  border-radius: 70px;
  transition: opacity 0.8s;
  overflow: hidden;
  z-index: -2;
}

.switch__background:after {
  content: '';
  opacity: 0;
  background: linear-gradient(to right, #21d2f2, #b0fff8);
  border-radius: 70px;
  transition: opacity 0.8s;
  z-index: -2;
}

.switch__toggle {
  content: '';
  height: 124px;
  width: 124px;
  position: relative;
  display: block;
  top: 8px;
  left: 8px;
  background: #fff;
  border-radius: 100%;
  box-shadow: inset 8px -8px 0 #f8e3ef, 0 0 93px rgba(255,255,255,0.65);
  transition: left 0.8s, box-shadow 0.8s;
  overflow: hidden;
  cursor: pointer;
}

.switch__toggle:before,
.switch__toggle:after {
  content: '';
  height: 90%;
  width: 90%;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  opacity: 0;
  transition: transition 0.8s, opacity 0.8s;
  background: rgba(255,255,255,0.65);
  filter: blur(8px);
}

.switch__toggle:before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.switch__toggle:after {
  transform: translate(-50%, -50%);
}

.switch__moon {
  width: 28px;
  height: 28px;
  display: block;
  position: absolute;
  left: 40%;
  top: 35%;
  background: linear-gradient(to bottom left, #f8e3ef, rgba(248,227,239,0));
  box-shadow: 28px -28px 0 -8px rgba(248,227,239,0.5);
  border-radius: 100%;
  transition: transform 0.8s, opacity 0.8s;
}

.switch__moon:before {
  content: '';
  width: 23px;
  height: 23px;
  display: block;
  position: absolute;
  left: -70%;
  top: 195%;
  background: linear-gradient(to bottom left, #f8e3ef, rgba(248,227,239,0));
  box-shadow: 23px -23px 0 -8px rgba(248,227,239,0.5);
  border-radius: 100%;
  transform: rotate(-60deg);
}

.switch__moon:after {
  content: '';
  width: 35px;
  height: 35px;
  display: block;
  position: absolute;
  left: 190%;
  top: 55%;
  background: linear-gradient(to bottom left, #f8e3ef, rgba(248,227,239,0));
  box-shadow: 35px -35px 0 -8px rgba(248,227,239,0.5);
  border-radius: 100%;
}

.switch__stars {
  width: 8px;
  height: 8px;
  display: block;
  position: absolute;
  left: 60%;
  top: 35%;
  background: #fff;
  box-shadow: 24px -24px 0 -3px #fff;
  filter: blur(0.5px);
  border-radius: 100%;
  transition: transform 0.8s, opacity 0.8s;
}

.switch__stars:before {
  content: '';
  width: 7px;
  height: 7px;
  display: block;
  position: absolute;
  left: 700%;
  top: 560%;
  background: #fff;
  box-shadow: 21px -21px 0 -3px #fff;
  filter: blur(0.5px);
  border-radius: 100%;
  transform: rotate(-75deg);
  transition: transform 0.8s, opacity 0.8s;
}

.switch__stars:after {
  content: '';
  height: 5px;
  width: 5px;
  position: absolute;
  left: 200%;
  top: 260%;
  opacity: 0;
  background: linear-gradient(to right, #fff, rgba(255,255,255,0));
  filter: blur(0.5px);
  animation: falling-stars 6.4s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
  animation-delay: 3.2s;
}

.switch__clouds {
  height: 28px;
  width: 28px;
  background: #fff;
  position: absolute;
  top: 50%;
  left: -84px;
  display: block;
  transition: 1.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 50% 50% 0 50%;
}

.switch__clouds:before,
.switch__clouds:after {
  content: '';
  height: 23px;
  width: 23px;
  background: #fff;
  position: absolute;
  border-radius: 50% 50% 0 50%;
  left: -33%;
  bottom: 0;
  box-shadow: inset 4px -2px 0 #f6f8f8;
}

.switch__clouds:after {
  height: 21px;
  width: 21px;
  left: auto;
  right: -30%;
  border-radius: 100%;
}

.switch__input {
  display: none;
}

.switch__input:checked + .switch__background {
  box-shadow: 0 35px 70px -16px rgba(33,210,242,0.3);
}

.switch__input:checked + .switch__background:before {
  opacity: 0;
}

.switch__input:checked + .switch__background:after {
  opacity: 1;
}

.switch__input:checked + .switch__background .switch__toggle {
  left: 168px;
  box-shadow: inset 0 0 0.1px #fff, 0 0 32px #fff;
  animation: overlay 0s forwards;
  animation-delay: 0.4s;
}

.switch__input:checked + .switch__background .switch__toggle:before,
.switch__input:checked + .switch__background .switch__toggle:after {
  opacity: 1;
  transition-delay: 0.4s;
}

.switch__input:checked + .switch__background .switch__toggle:before {
  transform: translate(-50%, -50%) rotate(45deg);
  animation: spin-before 12.8s linear infinite;
}

.switch__input:checked + .switch__background .switch__toggle:after {
  transform: translate(-50%, -50%);
  animation: spin-after 12.8s linear infinite;
}

.switch__input:checked + .switch__background .switch__moon {
  opacity: 0;
  transform: translate(-50%, 100%) rotate(30deg);
}

.switch__input:checked + .switch__background .switch__stars {
  opacity: 0;
  transform: translateX(-47px);
}

.switch__input:checked + .switch__background .switch__stars:before {
  opacity: 0;
  transform: translateX(-35px);
}

.switch__input:checked + .switch__background .switch__stars:after {
  animation: none;
}

.switch__input:checked + .switch__background .switch__clouds {
  transform: translateX(150px);
  transition-delay: 0.2s;
  animation: cloud-move 8s linear infinite;
  animation-delay: 1.6s;
}

.switch__input:checked + .switch__background .switch__clouds:before,
.switch__input:checked + .switch__background .switch__clouds:after {
  animation: cloud-move 8s linear infinite;
  animation-delay: 1.6s;
}

@keyframes overlay {
  0% { overflow: hidden; }
  100% { overflow: visible; }
}

@keyframes spin-before {
  0% { transform: translate(-50%, -50%) rotate(45deg); }
  100% { transform: translate(-50%, -50%) rotate(405deg); }
}

@keyframes spin-after {
  0% { transform: translate(-50%, -50%) rotate(0); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes falling-stars {
  0% { width: 50%; opacity: 1; transform: translate(70px, -70px) rotate(-45deg); }
  5% { width: 400%; opacity: 1; }
  15% { box-shadow: -100px -30px 0 -3px #fff; }
  25%, 100% { box-shadow: -100px -30px 0 -6px #fff; width: 400%; opacity: 0; transform: translate(-70px, 70px) rotate(-45deg); }
}

@keyframes cloud-move {
  0% { box-shadow: inset 4px -2px 0 #f6f8f8, -100px -47px 5px -2px rgba(33,210,242,0); }
  50% { box-shadow: inset 4px -2px 0 #f6f8f8, -30px -47px 6px -2px #90e8f8; }
  90%, 100% { box-shadow: inset 4px -2px 0 #f6f8f8, -3px -47px 15px 2px rgba(33,210,242,0); }
}

/* Fix Star Rating */
.star-rating-input .star-filled {
    color: orange;
}
.star-rating-input .star-empty {
    color: lightgray;
}

.star-rating-input {
    display: flex !important;
    gap: 2px;
}

.star-rating-input .star {
    cursor: pointer;
    font-size: 24px;
    min-width: 24px; /* Ensure they don't collapse */
    display: inline-block;
    transition: color 0.2s;
}

[data-bs-theme="dark"] .star-rating-input .star-filled {
    color: #fbbf24 !important;
}

[data-bs-theme="dark"] .star-rating-input .star-empty {
    color: #9ca3af !important; /* Lighter grey for better visibility */
}

/* Invert Default Logos in Dark Mode (Corrected) */
[data-bs-theme="dark"] img[src*="logo.svg"],
[data-bs-theme="dark"] img[src*="logo.webp"] {
    filter: invert(1) grayscale(1);
    background-color: transparent !important; /* Ensure bg is transparent */
}

/* FIX: Calculator Navigation (Chips) */
[data-bs-theme="dark"] .tool-nav-item {
    background-color: #2d2d2d !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .tool-nav-item:hover {
    background-color: #333 !important;
    color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

[data-bs-theme="dark"] .tool-nav-item.active {
    background-color: #3b82f6 !important;
    color: #fff !important;
    border-color: #3b82f6 !important;
}

[data-bs-theme="dark"] .tools-nav-toggle {
    background-color: #2d2d2d !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .tools-nav-toggle:hover {
    background-color: #333 !important;
    color: #3b82f6 !important;
}

/* FIX: PVM Calculator Inputs & Radio Buttons */
[data-bs-theme="dark"] .form-label.text-muted {
    color: #a0a0a0 !important;
}

/* Override inline styles on inputs and select */
[data-bs-theme="dark"] input[name="amount"], 
[data-bs-theme="dark"] select[name="vat_rate"] {
    background-color: #2d2d2d !important;
    border-color: #444 !important;
    color: #fff !important;
}

/* Override inline styles on radio button containers */
[data-bs-theme="dark"] .form-check.p-3.border {
    background-color: #2d2d2d !important;
    border-color: #444 !important;
}

/* PVM Results Section */
[data-bs-theme="dark"] #results-section {
    background-color: #1e1e1e !important; /* Dark card background */
}

[data-bs-theme="dark"] #results-section .bg-white {
    background-color: #2d2d2d !important; /* Inner container dark */
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

[data-bs-theme="dark"] #results-section .text-muted {
    color: #a0a0a0 !important;
}

/* FIX: Comparison Page Table */
[data-bs-theme="dark"] .comparison-outer-wrapper {
    background: #121212 !important;
}

/* Sticky First Column (Headers) */
[data-bs-theme="dark"] .sticky-col-text {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
    box-shadow: 2px 0 5px -2px rgba(0,0,0,0.5) !important;
}

/* Data Cells (TH and TD) */
[data-bs-theme="dark"] .comparison-table th.col-data,
[data-bs-theme="dark"] .comparison-table td {
    background-color: #121212 !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

/* Company Title Link in Header */
[data-bs-theme="dark"] .comparison-table th.col-data a.text-dark {
    color: #fff !important;
}

/* Remove Button */
[data-bs-theme="dark"] .comparison-table th.col-data a.bg-light {
    background-color: #333 !important;
    color: #ef4444 !important; /* Red text */
}

[data-bs-theme="dark"] .comparison-table th.col-data a.bg-light:hover {
    background-color: #444 !important;
}

.theme-toggle-container {
    display: none;
}

/* ========================================= */
/*             DARK MODE STYLES              */
/* ========================================= */

[data-bs-theme="dark"] body {
    background-color: #121212;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .page-wrapper,
[data-bs-theme="dark"] .main-content,
[data-bs-theme="dark"] .site-benefits,
[data-bs-theme="dark"] .hero-section,
[data-bs-theme="dark"] .top-companies-section,
[data-bs-theme="dark"] .calculators-section,
[data-bs-theme="dark"] .auth-form,
[data-bs-theme="dark"] .top-bar,
[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] section, 
[data-bs-theme="dark"] body {
    background-color: #121212 !important;
    color: #e0e0e0;
}

/* Top Bar and Header Links */
[data-bs-theme="dark"] .top-bar {
    border-bottom-color: #333;
}
[data-bs-theme="dark"] .top-link, 
[data-bs-theme="dark"] .main-nav a {
    color: #b0bec5 !important;
}
[data-bs-theme="dark"] .top-link:hover, 
[data-bs-theme="dark"] .main-nav a:hover,
[data-bs-theme="dark"] .main-nav a.active {
    color: #64b5f6 !important;
}

/* Company Header Card and Dashboard styles */
[data-bs-theme="dark"] .company-header-card,
[data-bs-theme="dark"] .dashboard-card,
[data-bs-theme="dark"] .custom-card,
[data-bs-theme="dark"] .card {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .company-name-large,
[data-bs-theme="dark"] .dashboard-card-title,
[data-bs-theme="dark"] .card-title {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .info-label,
[data-bs-theme="dark"] .text-muted {
    color: #a0a0a0 !important;
}

[data-bs-theme="dark"] .info-value,
[data-bs-theme="dark"] .info-row {
    color: #e0e0e0 !important;
    border-bottom-color: #333 !important;
}

/* Inputs */
[data-bs-theme="dark"] .search-input-wrapper {
    background-color: #2c2c2c !important;
    border-color: #444 !important;
}

[data-bs-theme="dark"] .hero-search-input {
    color: #ffffff !important;
}

/* Buttons */
[data-bs-theme="dark"] .btn-outline-primary {
    color: #64b5f6;
    border-color: #64b5f6;
}
[data-bs-theme="dark"] .btn-outline-primary:hover {
    background-color: #64b5f6;
    color: #000;
}

/* Feedback section */
[data-bs-theme="dark"] .feedback-list-item {
    border-bottom-color: #333 !important;
}
[data-bs-theme="dark"] .feedback-author {
    color: #fff !important;
}
[data-bs-theme="dark"] .feedback-comment {
    color: #d0d0d0 !important;
}

/* Fix for white boxes in company view */
[data-bs-theme="dark"] .company-logo-small {
    background-color: #fff; /* Keep logo background white so it is visible */
    border-color: #444;
}

/* Ensure links in dark mode content are visible */
[data-bs-theme="dark"] .main-content a:not(.btn) {
    color: #90caf9;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .dashboard-card,
[data-bs-theme="dark"] .dashboard-sidebar,
[data-bs-theme="dark"] .company-logo-view,
[data-bs-theme="dark"] .benefit-item,
[data-bs-theme="dark"] .list-group-item,
[data-bs-theme="dark"] .admin-container,
[data-bs-theme="dark"] header.main-header,
[data-bs-theme="dark"] .header-container,
[data-bs-theme="dark"] .mobile-menu-drawer,
[data-bs-theme="dark"] .dashboard-nav-link {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
    color: #e0e0e0;
}

/* Header Specifics */
[data-bs-theme="dark"] header.main-header {
    border-bottom: 1px solid #333;
}

[data-bs-theme="dark"] .header-search-input,
[data-bs-theme="dark"] .form-control {
    background-color: #2c2c2c !important;
    border-color: #444 !important;
    color: #fff !important;
}
[data-bs-theme="dark"] .form-control::placeholder {
    color: #aaa;
}

[data-bs-theme="dark"] .header-search-btn {
    background-color: #333;
    color: #fff;
    border-color: #444;
}

/* Links */
[data-bs-theme="dark"] a {
    color: #64b5f6;
}
[data-bs-theme="dark"] a:hover {
    color: #90caf9;
}
[data-bs-theme="dark"] .nav-link, 
[data-bs-theme="dark"] .dropdown-item,
[data-bs-theme="dark"] .drawer-link,
[data-bs-theme="dark"] .top-link,
[data-bs-theme="dark"] .footer-links a {
    color: #e0e0e0 !important;
}
[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .descriptor-link:hover,
[data-bs-theme="dark"] .footer-links a:hover {
    color: #fff !important;
}

/* Text Colors */
[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-light-muted,
[data-bs-theme="dark"] .benefit-item p,
[data-bs-theme="dark"] .hero-section p.lead,
[data-bs-theme="dark"] .company-profile-details span,
[data-bs-theme="dark"] .company-profile-details strong,
[data-bs-theme="dark"] label {
    color: #b0bec5 !important;
}

[data-bs-theme="dark"] h1, 
[data-bs-theme="dark"] h2, 
[data-bs-theme="dark"] h3, 
[data-bs-theme="dark"] h4, 
[data-bs-theme="dark"] h5, 
[data-bs-theme="dark"] h6,
[data-bs-theme="dark"] .info-label {
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .dashboard-nav-link.active {
    background-color: #0d2e4e !important;
    color: #64b5f6 !important;
    border-color: #1565c0 !important;
}

[data-bs-theme="dark"] .info-row {
    border-bottom-color: #333;
}

[data-bs-theme="dark"] .logo-thumbnail-placeholder,
[data-bs-theme="dark"] .company-logo-placeholder-view {
    background-color: #2c2c2c;
    border-color: #444;
    color: #888;
}

/* Invert default logo in header if needed, assuming SVGs are dark */
[data-bs-theme="dark"] .site-logo, 
[data-bs-theme="dark"] .drawer-logo {
    filter: brightness(0) invert(1);
}

/* Tables */
[data-bs-theme="dark"] table {
    background-color: #1e1e1e;
    color: #e0e0e0;
}
[data-bs-theme="dark"] table th,
[data-bs-theme="dark"] table td {
    border-bottom-color: #333;
}
[data-bs-theme="dark"] table thead th {
    background-color: #252525;
    border-bottom-color: #444;
}
[data-bs-theme="dark"] table tbody tr:hover {
    background-color: #2c2c2c;
}

/* Search Suggestions */
[data-bs-theme="dark"] .search-suggestions-container,
[data-bs-theme="dark"] .header-term-list,
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #252525 !important;
    border-color: #333 !important;
}
[data-bs-theme="dark"] .search-suggestions-container .suggestion-item,
[data-bs-theme="dark"] .header-term-list li,
[data-bs-theme="dark"] .dropdown-menu a {
    color: #e0e0e0 !important;
    border-bottom-color: #333;
}
[data-bs-theme="dark"] .search-suggestions-container .suggestion-item:hover,
[data-bs-theme="dark"] .header-term-list li:hover,
[data-bs-theme="dark"] .dropdown-menu a:hover {
    background-color: #333 !important;
    color: #fff !important;
}

