body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #f8f9fa;
}

h1, h2 {
  text-align: center;
  margin: 20px 0;
}

header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 10px;
  background-color: #006B6E;
  color: #f0f6f6;
  position: relative;
  z-index: 1; /* Add z-index to ensure header is above other elements */
}

.logout-text {
  position: absolute;
  right: 20px;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.3s ease;
}

.logout-text:hover {
  color: #ffcc00;
}

.container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.index-container {
  max-width: 500px; /* Set max-width to 500px */
}

.register-container {
  max-width: 600px; /* Set max-width to 800px */
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.form-container {
  width: 100%;
}

.profile-container {
  max-width: auto;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

input, select, button {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}

button {
  background-color: #006B6E;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #6d737a;
}

.error {
  color: red;
  margin-top: 5px;
  display: block;
}

.success {
  color: green;
  margin-top: 5px;
  display: block;
}

.main-container {
  display: flex;
  justify-content: space-between;
  padding: 20px;
}

.shippingrates-container {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  width: 90%;
  margin: 0 auto;
}

.price_st-container {
  display: flex;
  flex-direction: column;
  width: 25%;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.stso-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.rate-form-container {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
  width: 100%;
}

#rate-form > * {
  margin: 4px 0; 
}

.results-surcharges-container {
  display: flex;
  flex-direction: column;
  padding: 20px;
  width: 65%;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.hktime-container {
  padding: 10px;
  background-color: white;
  font-size: 16px;  
}

.fuelsurcharges-container {
  display: flex;
  background-color: #fff;  
}

#fuelsurcharges td {
  text-align: center;
  border: none;
}

#fuelsurcharges td:nth-child(3) {
  text-align: right;
}

#fuelsurcharges td:nth-child(4) {
  text-align: left;
}

.results-container {
  width: 100%;
  background-color: #fff;
}

#results table {
  width: 100%;
  border-collapse: collapse;
}

#results th, #results td {
  padding: 10px;
  border: 1px solid #ccc;
  text-align: left;
}

#results th {
  background-color: #006B6E;
  color: white;
  text-align: center; /* Center-align the table headers */
}

#results td {
  text-align: center; /* Right-align the table content */
}

.surcharges-container {
  width: 100%;
  background-color: #fff;
}

#surcharges table {
  width: 100%;
  border-collapse: collapse;
}

#surcharges th, #surcharges td {
  padding: 10px;
  border: 1px solid #ccc;
  text-align: left;
}

#surcharges th {
  background-color: #006B6E;
  color: white;
  text-align: center; /* Center-align the table headers */
}

#surcharges td:nth-child(2),  
#surcharges td:nth-child(3),
#surcharges td:nth-child(4),
#surcharges td:nth-child(5) { 
  text-align: center;
}

#surchargesPerCountry th {
  background-color: #006B6E;
  color: white;
  text-align: center; /* Center-align the table headers */
}

#surchargesPerCountry td:nth-child(2),  
#surchargesPerCountry td:nth-child(3),  
#surchargesPerCountry td:nth-child(4),  
#surchargesPerCountry td:nth-child(5) { 
  text-align: center;
}

#surchargesPerRegional th {
  background-color: #006B6E;
  color: white;
  text-align: center; /* Center-align the table headers */
}

#surchargesPerRegional td:nth-child(2),  
#surchargesPerRegional td:nth-child(3),  
#surchargesPerRegional td:nth-child(4),  
#surchargesPerRegional td:nth-child(5) { 
  text-align: center;
}

.handlingfees-container {
  width: 100%;
  background-color: #fff;
}

#handlingfees table {
  width: 100%;
  border-collapse: collapse;
}

#handlingfees th, #handlingfees td {
  padding: 10px;
  border: 1px solid #ccc;
  text-align: left;
}

#handlingfees th {
  background-color: #006B6E;
  color: white;
  white-space: nowrap;
  text-align: center;
}

#handlingfees td {
  text-align: right; /* Right-align the table content */
}

#handlingfees td:nth-child(1), 
#handlingfees td:nth-child(2),
#handlingfees td:nth-child(3) { 
  white-space: nowrap;
  text-align: left;
}

#handlingfees td:nth-child(6) { 
  text-align: left;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

th, td {
  padding: 10px;
  border: 1px solid #ccc;
  text-align: left;
}

th {
  background-color: #006B6E;
  color: white;
}

.serviceguide-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 950px;
  margin: 20px auto;
  padding: 20px;  
}

.dropdown {
  position: absolute;
  right: 20px;
  top: 10px;
  z-index: 2;
}

.dropbtn {
  background-color: #006B6E;
  color: white;
  padding: 20px;
  font-size: 20px;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  border-radius: 4px;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropbtn {
  background-color: #002527;
}

.file-modules {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.uploaded-files {
  width: 100%;
}

.upload-password-modules {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.upload-new-files, .change-password {
  width: 48%;
}

.inline-button {
  display: inline-block;
  margin-right: 10px;
}

.no-bullets {
  list-style-type: none;
  padding: 0;
}

.error-label {
  color: red;
}

.error-input {
  border-color: red;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 50%;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
}

.modal .close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal .close:hover, .modal .close:focus {
  color: black;
  text-decoration: none;
}

/* Buttons row for Update and Delete */
.buttons-row {
  display: flex;
  justify-content: center; /* Center align buttons */
  width: 90px;
  margin: 20px auto;
  gap: 20px;
}

/* Fuel Surcharges Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 50%;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
  text-align: center;
  margin-bottom: 20px;
}

.modal-content .form-group {
  margin-bottom: 15px;
}

.modal-content label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.modal-content input, .modal-content button {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.modal-content button {
  background-color: #006B6E;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.modal-content button:hover {
  background-color: #00494d;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover, .close:focus {
  color: black;
  text-decoration: none;
}

#fuelSurchargesButton, .add-surcharges-button {
  display: inline-block;
  margin: 0 10px;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #006B6E;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#fuelSurchargesButton:hover, .add-surcharges-button:hover {
  background-color: #00494d;
}

/* Check Fuel Surcharges Modal Styles */
#checkFuelSurchargesModal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

#checkFuelSurchargesModal .modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  max-width: 90%; /* Adjust width to fit content */
  max-height: 90%; /* Adjust height to fit content */
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  overflow-y: auto; /* Enable scrolling for overflowing content */
}

#checkFuelSurchargesModal .modal-content h2 {
  text-align: center;
  margin-bottom: 20px;
}

#checkFuelSurchargesModal .modal-content table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

#checkFuelSurchargesModal .modal-content th, #checkFuelSurchargesModal .modal-content td {
  padding: 10px;
  border: 1px solid #ccc;
  text-align: left;
}

#checkFuelSurchargesModal .modal-content th {
  background-color: #006B6E;
  color: white;
  text-align: center;
}

#checkFuelSurchargesModal .modal-content td {
  text-align: left;
}

#checkFuelSurchargesModal .close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

#checkFuelSurchargesModal .close:hover, #checkFuelSurchargesModal .close:focus {
  color: black;
  text-decoration: none;
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  .logout-text {
    position: static;
    margin-top: 10px;
  }

  .container {
    padding: 10px;
  }

  input, select, button {
    font-size: 14px;
  }

  .main-container {
    flex-direction: column;
  }

  .results-container {
    width: 100%;
  }

  .index-container, .register-container, .profile-container {
    width: 100%;
    padding: 10px;
  }

  .form-container {
    padding: 10px;
  }

  .file-modules, .upload-password-modules {
    flex-direction: column;
  }

  .uploaded-files, .upload-new-files, .change-password {
    width: 100%;
  }

  .dropdown-content {
    min-width: 100px;
  }

  .dropbtn {
    padding: 10px;
    font-size: 16px;
  }

  .dropdown-content a {
    padding: 10px;
  }

  table {
    font-size: 14px;
  }

  th, td {
    padding: 8px;
  }

  .form-group {
    margin-bottom: 10px;
  }

  .inline-button {
    width: 100%;
    margin-bottom: 10px;
  }

  .dropdown {
    width: 100%;
    text-align: center;
  }

  .dropbtn {
    width: 100%;
  }

  .dropdown-content {
    width: 100%;
  }

  .dropdown-content a {
    width: 100%;
    box-sizing: border-box;
  }

  .file-modules {
    flex-direction: column;
  }

  .uploaded-files, .upload-new-files, .change-password {
    width: 100%;
  }

  .form-container {
    padding: 0;
  }

  .form-group {
    margin-bottom: 15px;
  }

  .inline-button {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Mobile-specific styles */
@media (max-width: 768px) {
  body {
    font-size: 14px;
    padding: 0px;      
  }
  header {
    display: flex;
    flex-direction: column;
    align-items: center;    
  }
  .dropdown {
    width: auto;
    position: relative;
    margin-left: auto;
    margin-right: 0;
    text-align: center;      
  }
  
  .shippingrates-container {
    flex-direction: column;
  }
  .price_st-container, .results-surcharges-container {
    width: 100%;
  }
  .rate-form-container {
    display: flex;
    flex-direction: column;
  }
  .rate-form-container label, .rate-form-container input, .rate-form-container select, .rate-form-container button {
    width: 100%;
    margin-bottom: 10px;
  }
  .savequote-container {
    text-align: center;
  }

  .serviceguide-container {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;    
  }
}

.button-row {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.addsur-button {
  width: 30%;
  padding: 10px 10px;
  font-size: 16px;
  background-color: #006B6E;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-align: center;
  }

.addsur-button:hover {
  background-color: #00494d;
}

.searchsurch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.searchsurch-row label {
  font-size: 20px; 
  padding: 0 10px;
  text-align: center;
}

.searchsurch-form {
  width: 45%;
  padding: 10px 10px;
  font-size: 16px;
  text-align: center;
}

/* Surcharge Update Page Styles */
.return-button-container {
  text-align: center;
  margin-top: 20px;
}

.return-button {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #006B6E;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.return-button:hover {
  background-color: #00494d;
}

.delete-button {
  background-color: #006B6E;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.delete-button:hover {
  background-color: #c9302c;
}

/* Login Logs Table Styles */
#loginLogsContainer table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

#loginLogsContainer th, #loginLogsContainer td {
  padding: 10px;
  border: 1px solid #ccc;
}

#loginLogsContainer th {
  background-color: #006B6E;
  color: white;
  text-align: center; /* Center-align the table headers */
}

#loginLogsContainer td {
  text-align: left; /* Left-align the table content */
}

/* Service Guide Page Styles */
.button-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.service-button {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #006B6E;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.service-button.active {
  background-color: #00494d;
}

.service-button:hover {
  background-color: #00494d;
}

.content-container {
  margin: 20px 0;
  padding: 20px;
  background-color: #f8f9fa;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.admin-button {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #006B6E;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.admin-button:hover {
  background-color: #00494d;
}

/* Cookies & Privacy Policy Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #006B6E;
    color: white;
    text-align: center;
    padding: 10px;
    z-index: 1000;
    display: none;
}

.cookie-banner p {
    margin: 0;
    font-size: 14px;
}

.cookie-banner a {
    color: #ffcc00;
    text-decoration: underline;
}

.cookie-banner button {
    background-color: #ffcc00;
    color: #006B6E;
    border: none;
    padding: 5px 10px;
    margin-left: 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.cookie-banner button:hover {
    background-color: #e6b800;
}

#captchaImage {
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f8f8f8;
  margin-right: 5px;
}

#refreshCaptcha {
  background: none;
  border: none;
  color: #006B6E;
  font-size: 30px;
  cursor: pointer;
  padding: 0 5px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: left;
}

#refreshCaptcha:hover {
  color: #00494d;
}

.CheckUser-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1000px;
  white-space: nowrap;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}