body,
html {
  /* background-image: url("/static/images/background3.jpg");
    background-position: top left;
    background-size: cover; */
  color: #000000;
}

:root {
  /* ASAP brand blue in RGBA (opaque) */
  --asap-blue: rgba(1, 33, 104, 1);
}

/* Utility button using ASAP blue */
.btn-asap {
  background-color: var(--asap-blue) !important;
  border-color: var(--asap-blue) !important;
  color: #ffffff !important;
}
.btn-asap:hover,
.btn-asap:focus {
  background-color: rgba(1, 33, 104, 0.9) !important;
  border-color: rgba(1, 33, 104, 0.9) !important;
}

/* Style the video: full-screen background, behind all content */
#myVideo {
  position: fixed;
  right: 0;
  bottom: 0;
  min-width: 100%;
  min-height: 100%;
  z-index: -1;
}

.img-container {
  text-align: center;
}

.top-pad-bottom-logo {
  padding-top: 25px;
  padding-bottom: 25px;
}

.logo {
  position: relative;
  background-color: #ffffff;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 20px;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.heading {
  width: 400px;
  height: 300px;
  margin: auto;
  position: relative;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 30px;
}

.buttons {
  width: 600px;
  height: 300px;
  margin: auto;
  position: relative;
}

.title1 {
  display: block;
  text-align: center;
  color: #fdc300;
  font-size: 48pt;
  font-weight: bold;
  font-family: "Roboto", "Lucida Grande", sans-serif;
}

.title2 {
  display: block;
  margin-top: 15px;
  text-align: center;
  color: #fdc300;
  font-size: 14pt;
  font-family: sans-serif;
}

.text-center {
  text-align: center;
}

.center {
  margin-left: auto;
  margin-right: auto;
  opacity: 0.66;
}

tr {
  background-color: #ffffff;
  opacity: 0.66;
  padding-left: 10px;
  padding-right: 10px;
}

td {
  padding-left: 10px;
  padding-right: 10px;
}

a {
  display: block;
  margin-top: 15px;
  font-weight: bold;
  text-decoration: underline;
  text-align: left;
  color: #000000;
  font-size: 12pt;
  font-family: sans-serif;
}

.t {
  display: block;
  margin-top: 15px;
  margin-left: 25px;
  text-align: left;
  color: #000000;
  font-size: 12pt;
  font-family: sans-serif;
}

small {
  color: #000000;
  font-size: 8pt;
  font-family: sans-serif;
}

p {
  color: #000000;
  font-size: 12pt;
  font-family: sans-serif;
}

.text-bold {
  font-weight: bold;
}

.upload {
  margin: 50px auto;
  display: block;
  width: 180px;
  height: 50px;
  border: 1px solid #000000;
  background-color: #eeeeee;
  color: #000000;
  font-family: sans-serif;
  font-weight: bold;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: background-color 1000ms, color 1000ms;
}

.upload:hover {
  background-color: rgba(0, 0, 0, 0);
  color: #000000;
  cursor: pointer;
  transition: background-color 1000ms, color 1000ms;
}

#bottom {
  position: relative;
  z-index: 1;
  bottom: 0;
  width: 100%;
  background-color: #ffffff;
  padding: 20px;
}

.container {
  height: auto;
  margin-bottom: 50px;
}

footer {
  background-color: #ffffff;
  min-height: 60px;
  width: 100%;
  padding: 20px;
}

/* Ensure body stacks elements vertically */
body {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
}

/* Top navigation menu styling */
#topNavigation {
  background-color: #f8f9fa !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  width: 100%;
  z-index: 999;
}

#topNavigation .nav-link {
  font-weight: 500;
  color: #495057;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
}

#topNavigation .nav-link:hover {
  color: #007bff;
  background-color: rgba(0, 123, 255, 0.1);
}

#topNavigation .nav-link.active {
  color: #007bff;
  font-weight: 600;
  border-bottom: 3px solid #007bff;
  background-color: rgba(0, 123, 255, 0.1);
}

#topNavigation .nav-link i {
  margin-right: 8px;
  width: 20px;
  text-align: center;
}

/* Ensure main content floats above video background */
main {
  padding-top: 1rem;
  position: relative;
  z-index: 1;
  flex: 1;
}

/* Center content properly */
.content-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 70vh;
  justify-content: center;
  align-items: center;
}

/* Ensure logo navbar is at top */
.logo {
  position: relative;
  width: 100%;
  z-index: 1000;
}

/* Custom styles for invoices page */
/* Ensure all parent containers allow overflow */
.container-fluid .row .col-12,
.container-fluid .row [class*="col-"] {
  overflow-x: visible !important;
  max-width: 100% !important;
}

/* Ensure card-body doesn't constrain overflow */
.card-body.p-0 {
  overflow: visible !important;
  max-width: 100% !important;
  padding: 0 !important;
}

/* Force horizontal scrollbar on table wrapper */
.card-body.p-0 > div:first-child {
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  display: block !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: auto !important; /* Firefox */
  scrollbar-color: #888 #f1f1f1 !important; /* Firefox */
  -ms-overflow-style: scrollbar !important; /* IE and Edge */
}

/* WebKit scrollbar styling for wrapper */
.card-body.p-0 > div:first-child::-webkit-scrollbar {
  height: 17px !important;
  display: block !important;
  -webkit-appearance: none !important;
}

.card-body.p-0 > div:first-child::-webkit-scrollbar-track {
  background: #f1f1f1 !important;
  border-radius: 10px;
  -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.1) !important;
}

.card-body.p-0 > div:first-child::-webkit-scrollbar-thumb {
  background: #888 !important;
  border-radius: 10px;
  border: 2px solid #f1f1f1;
}

.card-body.p-0 > div:first-child::-webkit-scrollbar-thumb:hover {
  background: #555 !important;
}

/* Make table-responsive container - only scroll when needed */
.table-responsive,
.table-responsive.force-scrollbar,
#tableResponsive {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
}

/* Override Bootstrap's default table-responsive behavior */
.table-responsive[style*="overflow"],
#tableResponsive[style*="overflow"] {
  overflow-x: scroll !important;
}

/* Ensure wrapper also maintains scroll */
#tableWrapper {
  overflow-x: auto !important;
  overflow-y: visible !important;
  display: block !important;
  width: 100% !important;
}

/* Ensure scrollbar is visible in WebKit browsers (Chrome, Safari, Edge) */
.table-responsive::-webkit-scrollbar {
  height: 17px !important;
  display: block !important;
  -webkit-appearance: none !important;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f1f1 !important;
  border-radius: 10px;
  -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.1) !important;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #888 !important;
  border-radius: 10px;
  border: 2px solid #f1f1f1;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #555 !important;
}

/* Ensure table fills available width */
#invoicesTable {
  width: 100% !important;
  margin-bottom: 0 !important;
  table-layout: auto !important;
  border-collapse: collapse !important;
  box-sizing: border-box !important;
}

#invoicesTable th,
#invoicesTable td {
  vertical-align: middle;
  padding: 0.75rem;
}

/* Column widths - let them expand to fill available space */
#invoicesTable th:nth-child(1),
#invoicesTable td:nth-child(1) {
  width: auto;
  min-width: 120px;
}

#invoicesTable th:nth-child(2),
#invoicesTable td:nth-child(2) {
  width: auto;
  min-width: 100px;
}

#invoicesTable th:nth-child(3),
#invoicesTable td:nth-child(3) {
  width: auto;
  min-width: 120px;
}

#invoicesTable th:nth-child(4),
#invoicesTable td:nth-child(4) {
  width: auto;
  min-width: 200px;
}

#invoicesTable th:nth-child(5),
#invoicesTable td:nth-child(5) {
  width: auto;
  min-width: 120px;
}

#invoicesTable th:nth-child(6),
#invoicesTable td:nth-child(6) {
  width: auto;
  min-width: 100px;
  text-align: center;
}

#invoicesTable th:nth-child(7),
#invoicesTable td:nth-child(7) {
  width: auto;
  min-width: 150px;
}

#invoicesTable .badge {
  font-size: 0.85rem;
  padding: 0.35em 0.65em;
}

#invoicesTable .btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

#invoicesTable .btn-outline-primary {
  border-color: #007bff;
  color: #007bff;
}

#invoicesTable .btn-outline-primary:hover {
  background-color: #007bff;
  color: white;
}

#invoicesTable .btn-outline-secondary {
  border-color: #6c757d;
  color: #6c757d;
}

#invoicesTable .btn-outline-secondary:hover {
  background-color: #6c757d;
  color: white;
}

.flatpickr-calendar {
  width: auto !important;
  max-width: 400px !important;
}

.flatpickr-day {
  padding: 0.5em !important;
}

.flatpickr-weekday {
  font-size: 0.875em !important;
}

.flatpickr-months {
  width: auto !important;
}

.flatpickr-current-month {
  width: auto !important;
}
