html,
body {
  height: 100%;
  font-family: "Arial, sans-serif";
  background-color: #b6c6f1;
  color: #333;
  margin: 0;
  padding: 0;
  padding-top: 30px;
}

/* Wrapper will ensure the footer is pushed to the bottom */
.wrapper {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Content grows and takes available space */
.content {
  flex: 1;
  padding: 10px;
}

/* Navbar Styling */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #007bff;
  color: white !important;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.navbar-left {
  display: flex;
  align-items: center;
  margin-left: 20px;
}

/* Circular Avatar with Initial */
.user-initial {
  width: 30px;
  height: 30px;
  background-color: #ffdd57;
  color: #333;
  font-weight: bold;
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  margin-right: 10px;
  text-transform: uppercase;
}

.navbar-right {
  margin-right: 20px;
}

.navbar h2 {
  margin: 0;
  font-size: 20px;
  color: white !important;
}

/* Navbar Links Styling */
.navbar a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #ffdd57;
}

.button-section {
  display: flex;
  justify-content: center;
  gap: 20px; /* Space between buttons */
  margin: 30px auto;
}

.button-section button {
  width: fit-content;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap; /* Prevent button text from wrapping */
}

.button-section button:hover {
  background-color: #0056b3;
  transform: translateY(-2px); /* Lift effect on hover */
}

.button-section button:active {
  transform: translateY(0); /* Return to normal when clicked */
}

h1,
h2,
h3 {
  text-align: center;
  color: #333;
}

/* Navigation Links */
a {
  display: inline-block;
  /* margin: 10px 0; */
  /*padding: 15px 0;*/
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
}

a:hover {
  color: #0056b3;
}

/* Forms Styling */
form {
  margin: 20px auto;
  padding: 20px;
  background-color: #ffffff;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

form h3 {
  margin-bottom: 15px;
}

/* Each form group should align inputs with labels */
.form-group {
  display: flex;
  flex-direction: column;
}

/* Label Styling */
.form-group label {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 14px;
}

/* Full-width button centered across columns */
.form-submit {
  grid-column: span 2;
}

label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-sizing: border-box;
}

button {
  width: 100%;
  padding: 10px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

/* Table Styling */
table {
  width: 95%;
  margin: 20px auto;
  border-collapse: collapse;
  background-color: #ffffff;
  /* border-radius: 10px; */
  overflow: hidden;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
}

th,
td {
  padding: 6px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: middle; /* Ensure content is vertically centered */
}

/* Table Header */
th {
  background-color: #007bff;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 14px;
}

/* Alternate Row Colors */
tr:nth-child(even) {
  background-color: #E0E0E0;
}

tr:hover {
  background-color: #fbd9d3;
  transition: background-color 0.3s ease;
}

/* Inline Button Container (Ensures buttons align properly) */
td button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /*width: 25px;*/
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  /*border-radius: 50%;*/
  transition: all 0.3s ease;
  font-size: 18px;
  color: #007bff;
  padding: 0;
  margin: 2px; /* Spacing between buttons */
  text-decoration: none;
}

td button i {
    margin-right: 10px;
}

td button:hover {
  background-color: rgba(0, 123, 255, 0.4);
  color: #0056b3;
}

/* Disabled button */
td button:disabled {
  color: #ccc;
  cursor: not-allowed;
}

/* Client profile link */
td a {
  color: #007bff;
  font-weight: bold;
  text-decoration: none;
}

td a:hover {
  background-color: rgba(0, 123, 255, 0.1);
  color: #0056b3;
}

/* Table rows and hover effects */
tr {
  transition: background-color 0.3s ease;
}

td {
  font-size: 15px;
  color: #333;
}

.td-row {
  display: grid;
  grid-template-columns: auto 1fr;
}

.td-row span {
  text-align: right;
}

.td-notes {
    width: 12vw;
}

/* Modal Background Overlay */
.import-export-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

/* Modal Content */
.import-export-modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #b6c6f1;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  width: 60%;
  max-width: 800px;
  max-height: 90%;
  overflow-y: auto;
}

/* Close Button */
.import-export-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: red;
  color: white;
  padding: 5px 10px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
}

.import-export-close-btn:hover {
  background-color: darkred;
}

/* Import and Export Columns */
.import-export-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Section Styling */
.import-section,
.export-section {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.import-section h4,
.export-section h4 {
  margin-top: 0;
}

input[type="file"] {
  display: block;
  margin-bottom: 10px;
}

footer {
  background-color: #222;
  color: white;
  text-align: center;
  /* padding: 15px; */
  font-size: 14px;
  position: relative;
  bottom: 0;
  width: 100%;
  box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.2);
}

footer p {
  margin: 0;
}

footer a {
  color: #00aaff;
  text-decoration: none;
  font-weight: bold;
}

footer a:hover {
  color: #51c2fa;
}

#historyPagination button {
  width: fit-content;
  padding: 8px 12px;
  margin: 0 5px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#historyPagination button.active {
  background-color: #0056b3;
  font-weight: bold;
}

#historyPagination button:hover {
  background-color: #0056b3;
}

/* Status Badge Styling */
.status-badge {
  padding: 5px 10px;
  border-radius: 5px;
  font-weight: bold;
  display: inline-block;
}

.status-active {
  background-color: #28a745;
  color: white;
}

.status-suspended {
  background-color: #dc3545;
  color: white;
}

#serversTable {
    table-layout: fixed;
    width: 100%;
}

#popupNotification {
  width: 250px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  animation: fadeIn 1s ease;
}

#popupNotification h3 {
  margin: 0;
  padding-bottom: 10px;
}

#popupNotification button {
  margin: 5px auto;
  padding: 10px 10px;
  border: none;
  background-color: #ff4d4d;
  color: white;
  cursor: pointer;
  border-radius: 3px;
}

#viewExpiringServers {
  background-color: #007bff !important;
}

#viewExpiringServers:hover {
  background-color: #0056b3 !important;
}

#popupNotification button:hover {
  background-color: #e63939;
}

/* Modal Background Overlay */
#modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  animation: fadeIn 0.5s ease;
}

/* Modal Content */
#expiringServersList {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #b6c6f1;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  width: fit-content;
  animation: scaleIn 0.5s ease;
  height: 75vh;
  overflow: auto;
}

.modal-content {
    overflow-y: auto;
}

/* Table Styling in Modal */
#expiringTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

#expiringTable th,
#expiringTable td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

#expiringTable th {
  background-color: #007bff;
  color: white;
  font-size: 14px;
  text-transform: uppercase;
}

#expiringTable tr:hover {
  background-color: #f1f1f1;
  transition: background-color 0.3s ease;
}

/* Close Button */
.close-btn {
  width: fit-content;
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #e63946;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.close-btn:hover {
  background-color: #d62828;
  transform: scale(1.1);
}

/* Pagination Styling */
#expiringPagination {
  margin-top: 20px;
  text-align: center;
}

#expiringPagination button {
  width: fit-content;
  padding: 8px 12px;
  margin: 0 5px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#expiringPagination button.active {
  background-color: #0056b3;
  font-weight: bold;
}

#expiringPagination button:hover {
  background-color: #0056b3;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

#historyModal {
  width: fit-content;
  background-color: #b6c6f1;
  border-radius: 10px;
  box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.5s ease;
  padding: 20px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

/* Table styling inside modal */
#historyModal table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

#historyModal th,
#historyModal td {
  padding: 6px;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

#historyModal th {
  background-color: #007bff;
  color: white;
  text-transform: uppercase;
  font-size: 14px;
}

#historyModal tr:nth-child(even) {
  background-color: #f9f9f9;
}

#historyModal tr:hover {
  background-color: #e8f3ff;
  transition: background-color 0.3s ease;
}

/* Close button */
#closeHistoryModal {
  width: fit-content;
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: red;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#closeHistoryModal:hover {
  background-color: darkred;
  transform: scale(1.1);
}

/* Modal Background Overlay */
.assign-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

/* Modal Content Styling */
.assign-modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #b6c6f1;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  width: 50%;
  max-width: 600px;
}

.assign-modal-content h3 {
  margin-top: 0;
  font-size: 22px;
}

/* Form Input Styling */
.assign-modal-content input {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

/* Submit Button Styling */
.assign-modal-content button {
  background-color: #007bff;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.assign-modal-content button:hover {
  background-color: #0056b3;
}

/* Close Button Styling */
.assign-close-btn {
  width: fit-content;
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: red;
  color: white;
  padding: 5px 10px;
  border: none;
  border-radius: inherit;
  cursor: pointer;
  font-size: 18px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.assign-close-btn:hover {
  background-color: darkred;
}

/* Modal Background Overlay */
.add-server-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

/* Modal Content Styling */
.add-server-modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #b6c6f1;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  width: 50%;
  max-width: 600px;
  max-height: 90%;
  overflow-y: auto;
}

.add-server-modal-content h3 {
  margin-top: 0;
  font-size: 22px;
}

/* Form Input Styling */
.add-server-modal-content input {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

/* Form styling */
.two-column-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  align-items: center;
}

/* Ensure inputs take full width inside the columns */
.two-column-form input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

/* Full width for the submit button */
.submit-btn {
  grid-column: span 2;
  background-color: #007bff;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
}

.submit-btn:hover {
  background-color: #0056b3;
}

/* Close button */
.add-server-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: red;
  color: white;
  padding: 5px 10px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
}

.add-server-close-btn:hover {
  background-color: darkred;
}

/* Styling the Form */
#searchFilterForm {
  width: 90%;
  margin: 0 auto 10px auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

/* Grid Layout for the Rows */
.grid-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 5px;
}

/* Styling Inputs, Selects, and Buttons */
#searchFilterForm input[type="text"],
#searchFilterForm select,
#searchFilterForm button {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-sizing: border-box;
}

/* Column Sizing */
#searchFilterForm input[type="text"] {
  grid-column: span 4;
}

#searchFilterForm button[type="submit"] {
  grid-column: span 1;
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-align: center;
}

#searchFilterForm button[type="submit"]:hover {
  background-color: #0056b3;
}

#clearFilters {
  grid-column: span 1;
  background-color: #dc3545;
  color: white;
}

#clearFilters:hover {
  background-color: #b71c1c;
}

/* Ensure consistent height */
#searchFilterForm input[type="text"],
#searchFilterForm select,
#searchFilterForm button {
  height: 40px;
}

#pagination {
  width: 50%;
  margin: 20px auto;
  display: flex;
  justify-content: center;
  gap: 5px;
  text-align: center;
}

#pagination button {
  width: fit-content;
  padding: 8px 12px;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#pagination button.active {
  background-color: #0056b3;
  font-weight: bold;
}

#pagination button:hover {
  background-color: #0056b3;
}

/* Disable button when not clickable */
#pagination button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* Ellipsis */
#pagination span {
  padding: 8px 12px;
  color: #333;
  font-weight: bold;
}

/* Main grid layout for the user management panel */
.user-management-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  padding: 20px;
}

.add-user-section {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  height: fit-content; /* Prevent the add-user section from growing */
}

.users-list-section {
  display: flex;
  flex-direction: column;
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  overflow-y: auto; /* Enable scrolling if content overflows */
}

/* Make sure the table takes full height of its parent section */
.users-list-section table {
  width: 100%;
  border-collapse: collapse;
  flex-grow: 1; /* Allow the table to grow within the section */
}

/* Form inputs and button styling */
#addUserForm label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

#addUserForm input {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

#addUserButton {
  margin-top: 15px;
  background-color: #007bff;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#addUserButton:hover {
  background-color: #0056b3;
}

/* Users table styling */
#usersTable {
  width: 100%;
  border-collapse: collapse;
}

#usersTable th,
#usersTable td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

#usersTable th {
  background-color: #007bff;
  color: white;
}

/* Buttons inside table */
.users-action-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.users-action-buttons button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
}

.users-action-buttons button:hover {
  color: #007bff;
}

/* Disabled buttons styling */
.users-action-buttons button:disabled {
  color: #ccc;
  cursor: not-allowed;
}


.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: fadeInOut 5s forwards;
}

.toast.success {
    background-color: #28a745;
}

.toast.error {
    background-color: #dc3545;
}

/* Toast fade-in and fade-out animation */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px); }
    10%, 90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(20px); }
}



/* Responsive Design */
@media (max-width: 768px) {
    
  .navbar {
      flex-direction: column;
  }
    
  .button-section {
    flex-direction: column;
    gap: 15px; /* Reduce gap on mobile */
  }

  .button-section button {
    width: 80%; /* Make buttons wider on smaller screens */
    margin: 0 auto;
  }
  
  table, thead, tbody, th, td, tr {
    display: block;
  }

 thead {
    display: none;
  }

  tr {
    margin-bottom: 10px;
    border: 1px solid #ddd;
  }

  td {
    display: flex;
    justify-content: space-between;
    padding: 8px;
  }

  td::before {
    content: attr(data-label);
    font-weight: bold;
  }
  
  td button {
    width: 35px;
    height: 35px;
  }
  
  .td-notes {
      width: 100%;
  }

  form {
    width: 90%;
  }
  
  select {
      width: 50%;
  }

  #historyModal {
    width: 90%;
    padding: 15px;
  }

  #historyModal th,
  #historyModal td {
    padding: 8px;
    font-size: 14px;
  }

  #closeHistoryModal {
    padding: 8px 12px;
    font-size: 16px;
  }
  .grid-container {
    grid-template-columns: 1fr;
  }

  #searchFilterForm input[type="text"],
  #searchFilterForm select,
  #searchFilterForm button {
    width: 100%;
    grid-column: span 1;
  }

  #pagination {
    width: 90%;
  }

  #pagination button {
    padding: 6px 10px;
  }
  
  #expiringServersList {
    width: 90%;
    height: 70%;
    max-height: 75vh;
    border-radius: 0;
  }

  .modal-content {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }

  #expiringTable {
      height: 55vh;
  }

  #expiringTable th,
  #expiringTable td {
    padding: 10px;
    font-size: 14px;
  }

  .close-btn {
    top: 5px;
    right: 5px;
    padding: 6px 10px;
    font-size: 16px;
  }

  #expiringPagination button {
    padding: 6px 10px;
  }
  
  .user-management-grid{
      grid-template-columns: 1fr;
  }
  
  .client-details {
      width: auto;
  }
  
}
