:root {
  --primary-blue: #004b8d;
  --secondary-yellow: #ffda00;
  --light-grey: #f4f4f4;
  --medium-grey: #ddd;
  --dark-grey: #333;
  --text-color: #444;
  --border-radius: 8px;
  --box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

* { box-sizing: border-box; }

body {
  font-family: Arial, sans-serif;
  background-color: var(--light-grey);
  color: var(--text-color);
  line-height: 1.6;
}

/* --- Header --- */
.ct-signin-header {
  background-color: var(--primary-blue);
  color: white;
  padding: 10px 20px;
  text-align: right;
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.ct-signin-header a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1em;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  transition: color 0.2s, background 0.2s;
}

.ct-signin-header a:hover,
.ct-signin-header a:focus {
  color: #ffda00;
  background: #003a6e;
  outline: none;
}

.ct-signin-header .signin-icon {
  margin-right: 7px;
  font-size: 1.1em;
  display: inline-block;
  width: 1em;
  height: 1em;
}

.ct-signin-header .signin-icon svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: #fff;
}

.ct-signin-header .home-icon {
  margin-right: 7px;
  font-size: 1.15em;
  display: inline-block;
  width: 1em;
  height: 1em;
}

.ct-signin-header .home-icon svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: #fff;
}

.bootstrap-select > .dropdown-toggle.bs-placeholder {
  color: black !important;
}

.agency-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: white;
  border-bottom: 1px solid var(--medium-grey);
  gap: 15px;
  text-align: center;
  width: 100%;
}

.agency-seal {
  width: 150px;
  height: 150px;
  background-color: #e0e0e0;
  border: 1px solid #c0c0c0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  color: #888;
  overflow: hidden;
  flex-shrink: 0;
  margin: 0 auto;
}

.agency-seal img {
  width: 140%;
  height: 140%;
  object-fit: contain;
}

.agency-title {
  font-family: Arial, sans-serif;
  font-size: 1.8em;
  color: var(--primary-blue);
  font-weight: 700;
}

.announcements {
  background-color: var(--secondary-yellow);
  color: var(--dark-grey);
  padding: 12px 20px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95em;
  box-shadow: var(--box-shadow);
  margin-bottom: 20px;
  width: 100%;
}

.container {
  display: flex;
  flex-direction: row;     
  align-items: stretch;
  gap: 20px;
  width: 100%;
  margin: 0;
  padding: 0;              
  max-width: 100% !important;
}

.container-fluid {
  display: flex;
  flex-direction: row;     
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;              
  max-width: 100% !important;
}

.container,
.container-fluid {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
}

.row { --bs-gutter-x: 0; }

/* Sidebar + main */
.left-nav {
  background-color: #fff;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  width: 250px;            
  flex-shrink: 0;
}

.left-nav h3 {
  margin-top: 0;
  color: var(--primary-blue);
  font-size: 1.3em;
  border-bottom: 2px solid var(--medium-grey);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.left-nav ul {
  list-style-type: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.left-nav li { margin-bottom: 0; }

.left-nav a {
  text-decoration: none;
  color: var(--primary-blue);
  font-weight: 600;
  display: block;
  padding: 10px 15px;
  border-radius: var(--border-radius);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.left-nav a:hover,
.left-nav a:focus {
  background-color: var(--primary-blue);
  color: white;
  outline: none;
}

.main-content {
  flex: 1;                 
  min-width: 0;             
  padding: 20px;
  background-color: #fff;
}

.search-section {
  background-color: #fff;
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 20px;
}

.search-section h2 {
  color: var(--primary-blue);
  font-size: 1.8em;
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
}

.search-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px 32px;
  margin-bottom: 0;
}

.search-form label {
  font-weight: 600;
  color: var(--primary-blue);
  margin-bottom: 5px;
  display: block;
}

.search-form input,
.search-form select,
.search-form textarea {
  padding: 8px 12px;
  border-radius: 5px;
  border: 1px solid var(--medium-grey);
  font-size: 1em;
  width: 100%;
  box-sizing: border-box;
}

.search-form .multiselect { min-height: 38px; }

.search-form .search-form-row {
  display: flex;
  flex-direction: column;
}

.search-form-row-full { grid-column: 1/-1; }

.search-form-btn-row {
  grid-column: 1/-1;
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.search-form button {
  background-color: var(--primary-blue);
  color: white;
  border: none;
  padding: 12px 36px;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-form button:hover { background-color: #003a6e; }

.results-section {
  background-color: #fff;
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.results-section h3 {
  color: var(--primary-blue);
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.3em;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 12px;
  gap: 8px;
}

.results-actions label {
  font-weight: 600;
  color: var(--primary-blue);
}

.results-actions input[type="text"] {
  border-radius: 5px;
  border: 1px solid var(--medium-grey);
  padding: 8px 12px;
  font-size: 1em;
  min-width: 200px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
}

.results-table thead {
  background-color: var(--primary-blue);
  color: #fff;
}

.results-table th,
.results-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--medium-grey);
  position: relative;
  transition: background-color 0.2s;
}

.results-table th {
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.results-table th .sort-arrow {
  font-size: 1em;
  margin-left: 6px;
  color: #fff;
  font-weight: bold;
  transition: color 0.2s;
}

.results-table th:hover {
  background-color: #002e50 !important;
  color: #fff;
}

.results-table tr:hover td { background-color: var(--light-grey); }

.results-table a {
  color: var(--primary-blue);
  text-decoration: underline;
  font-weight: 600;
}

.no-results {
  color: var(--dark-grey);
  font-size: 1.1em;
  text-align: center;
  margin: 20px 0;
}

@media (max-width: 767.98px) {
  .container,
  .container-fluid {
    flex-direction: column;  
    gap: 16px;
  }

  .left-nav {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .agency-title {
    text-align: center;
    font-size: 2.5em;
  }
}

.custom-footer .footer-background {
  background-color: #0d2d6c;
  color: #ffffff;
  padding: 1.25rem 0 1rem 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.custom-footer .footer-links {
  padding: 0.75rem 0.75rem 0 0.75rem;
  margin-bottom: 0.25rem;
  line-height: 1.7;
  text-align: center;
}

.custom-footer .footer-main-links {
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
  padding-bottom: 0.15rem;
  letter-spacing: 0.5px;
  text-align: center;
}

.custom-footer .footer-main-links a,
.custom-footer .footer-contact a,
.custom-footer .footer-logo-centered a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  outline: none;
  transition: background 0.2s, color 0.2s;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-sizing: border-box;
}

.custom-footer .footer-main-links a:focus,
.custom-footer .footer-contact a:focus,
.custom-footer .footer-logo-centered a:focus {
  outline: 2px solid #ffcc00;
  outline-offset: 2px;
  background: #143b80;
  color: #ffcc00;
}

.custom-footer .footer-main-links a:hover,
.custom-footer .footer-contact a:hover,
.custom-footer .footer-logo-centered a:hover {
  text-decoration: underline;
  color: #ffcc00;
}

.custom-footer .footer-contact {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0;
  padding-bottom: 0;
  text-align: center;
}

.custom-footer .footer-separator {
  padding: 0 0.5em;
  color: #fff;
  font-size: 1em;
  font-weight: normal;
  display: inline;
}

.custom-footer .footer-logo-centered {
  text-align: center;
  padding-top: 0.6rem;
  padding-bottom: 0.3rem;
}

.custom-footer .footer-logo-centered img {
  max-width: 110px;
  width: 100%;
  height: auto;
  outline: none;
}

.custom-footer .footer-logo-centered a:focus img {
  outline: 2px solid #ffcc00;
  outline-offset: 2px;
}
.site-footer,
.custom-footer,
.footer-background,
.footer-links,
.footer-main-links,
.footer-contact,
.footer-logo-centered {
  text-align: center;
}

/* Center the links horizontally */
.footer-main-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  padding: 0;
}

/* Remove legacy bootstrap centering conflicts */
.center-block {
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Center the logo properly */
.footer-logo-centered {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
}
div.dataTables_wrapper {
  width: 100%;
}

div.dataTables_scrollHeadInner,
div.dataTables_scrollHeadInner table,
div.dataTables_scrollBody table {
  width: 100% !important;
}

div.dataTables_scrollHead table,
div.dataTables_scrollBody table {
  table-layout: fixed; /* stabilizes column widths */
}
@media (max-width: 600px) {
  .custom-footer .footer-background {
    padding: 0.6rem 0 0.7rem 0;
  }
  .custom-footer .footer-links {
    padding: 0.25rem 0.5rem 0.25rem 0.5rem;
    font-size: 1rem;
  }
  .custom-footer .footer-logo-centered {
    padding-top: 0.3rem;
    padding-bottom: 0.18rem;
  }
}
