html {
  font-size: 16px; /* Set base font size to prevent zoom on iPhone */
  height: auto;   /* Allow height to adjust automatically */
}

/* Updated color variables for a more cohesive palette */
:root {
  --primary-color: #2C3E50; /* Dark Blue */
  --secondary-color: #2C3E50; /* Teal */
  --accent-color: #2C3E50; /* Red */
  --background-color: #ECF0F1; /* Light Gray */
  --text-color: #2C3E50; /* Dark Blue */
  --header-footer-background: #343A40; /* Collapse color */
  --button-background: #007bff; /* AdminLTE button color */
  --button-hover-background: #0056b3; /* AdminLTE button hover color */
  --button-active-background: #004085; /* AdminLTE button active color */
  --checked-border-color: #28A745; /* Green color */
  --checked-background-color: rgba(40, 167, 69, 0.2); /* Green background color */
  --input-background: #ffffff; /* AdminLTE input background color */
  --input-border-color: #ced4da; /* AdminLTE input border color */
  --shadow-color: rgba(0, 0, 0, 0.2); /* AdminLTE shadow color */
  --border-radius: 5px; /* AdminLTE border radius */
  --highlight-color: #FFC107; /* Orange color */
  --dark-gray: #343a40; /* AdminLTE dark gray color */
  --placeholder-color: #6c757d; /* AdminLTE placeholder color */
  --red-color: #DC3545; /* Red color */
}

body.night-mode {
  --background-color: #343a40; /* AdminLTE dark background color */
  --text-color: #ffffff; /* AdminLTE light text color */
  --header-footer-background: #1f1f1f; /* AdminLTE dark header/footer color */
  --input-background: #2c2c2c; /* AdminLTE dark input background color */
  --input-border-color: #444; /* AdminLTE dark input border color */
}

/* Improved typography */
body {
  font-family: 'Roboto', sans-serif; /* Changed font family */
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  touch-action: manipulation;
  overflow: auto; /* Enable scrolling */
  height: auto;   /* Allow height to adjust automatically */
  user-select: none; /* Disable text selection */
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Ensure elements are spaced correctly */
  padding: 0 20px; /* Added padding on left and right */
  background-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 2px 4px var(--shadow-color);
  margin-bottom: 10px; /* Added margin at the bottom */
  position: relative; /* Ensure header is position relative for absolute positioning */
  height: 40px; /* Fixed header height */
}

header h1 {
  flex: 1; /* Allow the title to take up available space */
  text-align: center; /* Center the title */
  margin: 0; /* Remove default margin */
  line-height: 40px; /* Match the line-height to the header height for vertical centering */
}

footer {
  background-color: var(--primary-color);
  color: #ffffff; /* Ensure text color is white */
  padding: 10px; /* Reduce padding */
  text-align: center;
  box-shadow: 0 2px 4px var(--shadow-color);
  margin-top: 10px; /* Added margin at the bottom */
  position: relative; /* Ensure footer is positioned relative */
}

footer .toggle-admin {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background-color: transparent;
  border: none;
  color: #ffffff; /* Icon color */
  font-size: 1.5em;
  cursor: pointer;
  padding: 0;
}

footer .toggle-admin:hover {
  color: var(--highlight-color); /* Highlight color on hover */
}

h1 {
  font-size: 2.5em; /* Increased font size for better visibility */
  font-weight: 700;
  color: #ffffff;
}

/* Enhanced button styles */
button, .menu button, .controls button, .admin-table button, .toggle-admin, .toggle-night-mode {
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  border-radius: 5px; /* Reduced border radius for a sharper look */
  padding: 12px 24px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s, transform 0.2s;
  font-size: 1em;
  cursor: pointer; /* Ensure cursor changes to pointer */
  max-width: 100%; /* Ensure buttons do not exceed the width of their parent */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  user-select: none; /* Disable text selection */
}

/* Increase button sizes for better touch accessibility */
button {
  min-height: 44px;
  padding: 10px 20px;
  display: flex;
  align-items: center;     /* Center items vertically */
  justify-content: center; /* Center items horizontally */
  margin-top: 0;           /* Reset margin-top */
}

button:hover, .menu button:hover, .controls button:hover, .admin-table button:hover, .toggle-admin:hover, .toggle-night-mode:hover {
  background-color: var(--accent-color);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.container {
  width: 95%;        /* Increase the width to occupy more space */
  max-width: 1200px; /* Optional: Set a maximum width */
  margin: 0 auto;    /* Center the container */
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0; /* Reset margin-top */
}


.subcontainer {
  width: 100%;        /* Increase the width to occupy more space */
  
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 95%;
  max-width: 800px;
}

/* Prevent menu from displaying until it's fully initialized */
#menu {
  visibility: hidden;
}

#menu.visible {
  visibility: visible;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 15px; /* Increased gap between menu buttons */
  width: 100%;
}

/* Hide rows by default */
#rows {
  display: none;
  transition: display 0.3s ease;
}

/* Show rows when admin mode is active */
body.admin-mode #rows {
  display: block;
}

/* Optional: Add transition for smooth visibility toggle */
#rows {
  transition: display 0.3s ease;
}

.rows {
  display: none;
  margin-bottom: 500px;
  background-color: var(--header-footer-background);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px var(--shadow-color);
  width: 100%;
}

.row-container {
  margin-bottom: 10px; /* Increased space between rows */
}

.row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: 5px;
  margin-bottom: 5px;
  background-color: var(--input-background);
  padding: 5px;
  border-radius: var(--border-radius);
  transition: border-color 0.3s, background-color 0.3s;
  border: 8px solid var(--input-border-color);
}

.row.checked {
  border-color: var(--checked-border-color);
  background-color: var(--checked-background-color);
}

.row .row-title {
  margin-bottom: 5px;
  font-size: 0.9em;
}

.row .row-title input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px; /* Match the padding of the dropdown */
  font-size: 1em; /* Match the font size of the dropdown */
  color: var(--text-color);
}

.row .row-title input[type="text"]::placeholder {
  color: var(--placeholder-color); /* Empty field text color */
}

.row .row-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 5px;
  flex-wrap: nowrap; /* Prevent wrapping of elements */
  flex-direction: row;
}

.row .row-controls select,
.row .row-controls input[type="text"],
.row .row-controls input[type="checkbox"] {
  padding: 10px;
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  background-color: var(--input-background); /* Corrected variable syntax */
  color: var(--text-color);
  font-size: 1em;
}

.row .row-controls select {
  flex: 1;
  min-width: 50px;
  max-width: 150px; /* Further reduce max-width for smaller dropdowns */
  padding: 5px; /* Reduce padding */
  font-size: 0.8em; /* Reduce font size */
}

.row .row-controls input[type="checkbox"] {
  width: 25px;
  height: 25px;
}

.row .row-controls input[type="text"] {
  flex: 1;
  min-width: 50px;
  max-width: 150px; /* Further reduce max-width for smaller dropdowns */
  padding: 0px; /* Reduce padding */
  font-size: 0.8em; /* Reduce font size */
  text-align: center; /* Center the text */
}

.row .checkboxes {
  display: flex;
  align-items: center;
}

.controls {
  margin-bottom: 20px;
  display: none;
}

.controls input[type="text"],
.controls input[type="number"] {
  padding: 10px;
  margin-right: 10px;
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  background-color: var(--input-background);
  color: var(--text-color);
  ::placeholder {
    color: var(--placeholder-color); /* Empty field text color */
  }
}

/* Ensure input fields are easily tappable */
input[type="text"], input[type="number"], select {
  min-height: 40px;
  padding: 8px;
}

.controls button {
  padding: 12px 24px;
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  border-radius: 5px; /* Reduced border radius for a sharper look */
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  font-size: 1em;
  max-width: 100%; /* Ensure buttons do not exceed the width of their parent */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.controls button:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.toggle-admin {
  margin-bottom: 20px;
  padding: 12px 24px;
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  border-radius: 5px; /* Reduced border radius for a sharper look */
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  font-size: 1em;
}

.toggle-admin:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  color: var(--text-color);
}

.admin-table th, .admin-table td {
  border: 1px solid var(--input-border-color);
  padding: 10px;
  text-align: left;
}

.admin-table th {
  background-color: var(--header-footer-background);
}

.admin-table td {
  background-color: var(--input-background);
}

.admin-table input[type="text"],
.admin-table input[type="number"] {
  background-color: var(--input-background);
  color: var (--text-color);
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  padding: 5px;
  ::placeholder {
    color: var(--placeholder-color); /* Empty field text color */
  }
}

.admin-table button {
  padding: 12px 24px;
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  border-radius: 5px; /* Reduced border radius for a sharper look */
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  font-size: 1em;
}

.admin-table button:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Styles for the admin controls table */
.admin-controls-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.admin-controls-table td {
  padding: 10px;
  vertical-align: top; /* Ensure content is aligned to the top */
}

.admin-controls-table input[type="text"],
.admin-controls-table input[type="number"] {
  width: calc(100% - 20px); /* Adjust width to fit within padding */
  padding: 8px;
  box-sizing: border-box;
  margin-bottom: 10px; /* Add space between elements */
}

.admin-controls-table button {
  width: calc(100% - 20px); /* Adjust width to fit within padding */
  padding: 10px;
  margin-bottom: 10px; /* Add space between buttons */
  box-sizing: border-box;
}

.admin-controls-table .button {
  width: 100%;
  padding: 12px 0;
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.admin-controls-table .button:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .admin-controls-table td {
    padding: 5px;
  }

  .admin-controls-table input[type="text"],
  .admin-controls-table input[type="number"] {
    width: calc(100% - 10px); /* Adjust width to fit within padding */
    padding: 5px;
    margin-bottom: 5px; /* Reduce space between elements */
  }

  .admin-controls-table button {
    width: calc(100% - 10px); /* Adjust width to fit within padding */
    padding: 8px;
    margin-bottom: 5px; /* Reduce space between buttons */
  }
}

@media (max-width: 480px) {
  .admin-controls-table td {
    padding: 5px;
  }

  .admin-controls-table .button {
    padding: 10px 0;
  }

  .admin-controls-table input[type="text"],
  .admin-controls-table input[type="number"] {
    padding: 5px;
    font-size: 0.9em;
  }

  .admin-controls-table .button {
    padding: 8px 0;
    font-size: 0.9em;
  }
}

.rows-title {
  font-size: 1.5em;
  margin-bottom: 20px;
  text-align: center;
  color: var(--highlight-color); /* Orange */
}

.toggle-night-mode {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: transparent;
  border: none;
  color: #ffffff; /* Ensure dark mode button color is white */
  font-size: 1.5em;
  cursor: pointer;
  transition: color 0.3s;
}

.toggle-night-mode:hover {
  color: var(--highlight-color); /* Orange */
}

.toggle-side-menu {
  position: absolute; /* Ensure the button is positioned within the header */
  top: 10px;
  left: 10px;
  background-color: transparent;
  border: none;
  color: #ffffff; /* Ensure side menu button color is white */
  font-size: 1.5em;
  cursor: pointer;
  transition: color 0.3s, left 0.3s;
}

.toggle-side-menu:hover {
  color: var(--highlight-color); /* Orange */
}

.row input[type="checkbox"].red {
  accent-color: var(--red-color); /* Red color */
}

.row input[type="checkbox"].orange {
  accent-color: var(--highlight-color); /* Orange color */
}

.row input[type="checkbox"].green {
  accent-color: var(--checked-border-color); /* Green color */
}

.row.red-checked {
  border-color: rgba(220, 53, 69, 1); /* Red background color */
}

.row.orange-checked {
  border-color: rgba(255, 193, 7, 0.8); /* Orange background color */
}

.row.green-checked {
  border-color: rgba(40, 167, 69, 0.8); /* Green background color */
}

input[type="checkbox"].red:disabled {
  background-color: rgba(220, 53, 69, 0.3); /* Red disabled background color */
  border-color: rgba(220, 53, 69, 0.5); /* Red disabled border color */
}

input[type="checkbox"].green:disabled {
  background-color: rgba(40, 167, 69, 0.3); /* Green disabled background color */
  border-color: rgba(40, 167, 69, 0.5); /* Green disabled border color */
}

input[type="checkbox"]:disabled {
  cursor: not-allowed;
  position: relative;
}

input[type="checkbox"].red:disabled:checked::before,
input[type="checkbox"].green:disabled:checked::before {
  content: '';
  display: inline-block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

input[type="checkbox"].red:disabled:checked::before {
  background-color: rgba(220, 53, 69, 0.3); /* Red disabled checked background color */
}

input[type="checkbox"].green:disabled:checked::before {
  background-color: rgba(40, 167, 69, 0.3); /* Green disabled checked background color */
}

select {
  padding: 10px;
  margin-right: 10px;
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  background-color: var(--input-background);
  color: var(--text-color);
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="var(--text-color)" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
  transition: border-color 0.3s, box-shadow 0.3s;
  width: 100%;
}

input[type="text"]:focus, input[type="number"]:focus, select:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 5px rgba(24, 188, 156, 0.5);
}

.panel-group {
  width: 100%;
}

.panel {
  background-color: var(--header-footer-background);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px var(--shadow-color);
  margin-bottom: 10px;
}

.panel-heading {
  position: relative; /* Added to enable absolute positioning of checkmark */
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.3s;
  box-shadow: none; /* Remove the line under the text */
  border-radius: var(--border-radius);
}

.panel-heading:hover {
  box-shadow: 0 4px 8px var(--shadow-color);
}

.panel-heading.red-checked {
  background-color: rgba(220, 53, 69, 1); /* Red background color */
}

.panel-heading.orange-checked {
  background-color: rgba(255, 193, 7, 1); /* Orange background color */
}

.panel-heading.green-checked {
  background-color: rgba(40, 167, 69, 1); /* Green background color */
}

.panel-title {
  font-size: calc(0.8em + 0.5vw);
  margin: 0;
  color: var(--dark-gray); /* Dark Gray */
}

/* Adjust font size for smaller screens */
@media (max-width: 600px) {
  .panel-title {
    font-size: calc(0.8em + 0.5vw);
  }
}

/* Adjust font size for larger screens */
@media (min-width: 1200px) {
  .panel-title {
    font-size: calc(0.8em + 0.5vw);
  }
}

.panel-collapse {
  margin-left: 5px; /* Adjust margin for better alignment */
  margin-right: 5px; /* Adjust margin for better alignment */
  display: none;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.panel-collapse.expanded {
  display: block;
  max-height: 1000px; /* Adjust as needed */
}

.panel-body {
  padding: 20px;
  background-color: var(--header-footer-background);
}

.panel-footer {
  padding: 10px 20px;
  background-color: var(--header-footer-background);
  border-top: 1px solid var(--input-border-color);
}

a[data-toggle="collapse"] {
  color: #ffffff; /* Set link color to white */
}

@media (max-width: 768px) {
  .menu {
    flex-direction: column;
    align-items: stretch;
  }

  .menu button {
    flex: 1 1 100%;
    max-width: none;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
  }

  .row input[type="text"],
  .row select,
  .row input[type="checkbox"] {
    margin-bottom: 5px;
    width: auto; /* Ensure elements take full width */
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .controls input[type="text"],
  .controls input[type="number"],
  .controls button {
    margin-bottom: 5px;
    width: 100%;
  }

  .admin-table th,
  .admin-table td {
    padding: 5px;
  }

  .admin-table input[type="text"],
  .admin-table input[type="number"] {
    width: 100%;
  }

  .toggle-admin {
    width: 100%;
    margin-bottom: 5px;
  }

  .row .row-controls {
    gap: 10px; /* Maintain appropriate spacing */
  }
}

@media (max-width: 480px) {
  .menu button {
    padding: 5px;
    font-size: 0.8em;
  }

  .row input[type="text"],
  .row select,
  .row input[type="checkbox"] {
    padding: 5px;
    font-size: 0.8em;
  }

  .controls input[type="text"],
  .controls input[type="number"],
  .controls button {
    padding: 5px;
    font-size: 0.8em;
  }

  .admin-table th,
  .admin-table td {
    font-size: 0.8em;
  }

  .toggle-admin {
    padding: 5px;
    font-size: 0.8em;
  }

  .row .row-controls {
    gap: 5px; /* Reduce space between select dropdowns */
  }

  .row .row-controls select {
    flex: 1;
    min-width: 0px;
    max-width: 75px; /* Further reduce max-width for smaller dropdowns */
    padding: 5px; /* Reduce padding */
    font-size: 0.8em; /* Reduce font size */
  }
}

header, footer {
  padding: 5px;
  font-size: 0.9em;
}

/* Make panels full width for better display on mobile */
.content .panel {
  width: 100%;
}

/* Increase touch area for panel headings */
.panel-heading {
  padding: 15px;
}

/* Stack row controls vertically and adjust spacing */
.row .row-controls {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

/* Enlarge checkboxes for easier tapping */
.row .checkboxes input[type="checkbox"] {
  width: 30px;
  height: 30px;
}

/* Ensure buttons are easily tappable */
.controls button, .admin-table button {
  padding: 10px;
  font-size: 1em;
}

/* Adjust table layout for smaller screens */
.admin-table table, .admin-table th, .admin-table td {
  width: 100%;
  display: block;
}

.admin-table th, .admin-table td {
  box-sizing: border-box;
  padding: 8px;
}

/* Ensure default flex-direction is row */
.row .row-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  flex-wrap: wrap; /* Allow wrapping if necessary */
  flex-direction: row;
}

/* Override flex-direction in media queries if needed */
@media (max-width: 768px) {
  .row .row-controls {
    gap: 10px; /* Maintain appropriate spacing */
  }
}

@media (max-width: 480px) {
  .row .row-controls {
    gap: 5px; /* Adjust spacing as needed */
  }

  .row .row-controls select {
    flex: 1;
    min-width: 0px;
    max-width: 70px; /* Further reduce max-width for smaller dropdowns */
    padding: 5px; /* Reduce padding */
    font-size: 0.8em; /* Reduce font size */
  }
}

.admin-controls-table, .add-button-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.admin-controls-table th, .admin-controls-table td,
.add-button-table th, .add-button-table td {
  border: 1px solid var(--input-border-color);
  padding: 10px;
  text-align: left;
}

.admin-controls-table th, .add-button-table th {
  background-color: var(--header-footer-background);
  color: #ffffff;
}

.admin-controls-table input[type="text"],
.admin-controls-table input[type="number"],
.add-button-table input[type="text"],
.add-button-table input[type="password"],
.add-button-table input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
}

.admin-controls-table button, .add-button-table button {
  padding: 8px 16px;
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  max-width: 100%; /* Ensure buttons do not exceed the width of their parent */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.admin-controls-table button:hover, .add-button-table button:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .admin-controls-table, .add-button-table {
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  .admin-controls-table, .add-button-table {
    font-size: 0.8em;
  }

  .admin-controls-table button, .add-button-table button {
    padding: 6px 12px;
    font-size: 0.8em;
  }
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(143, 35, 35, 0.7); /* Dimmed background */
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 9999; /* Ensure it appears above all other content */
}

/* Ensure the overlay does not block touch events when hidden */
.overlay {
  display: none; /* Hide the overlay when not in use */
}

.overlay-content {
  color: white;
  font-size: 48px;
  font-weight: bold;
  text-align: center;
}

#adminControls {
  display: none; /* Hidden by default */
  padding: 20px;
  background-color: var(--background-color);
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-top: 20px;
}

@media (max-width: 480px) {
  .admin-controls-table, .add-button-table {
    font-size: 0.8em;
  }

  .admin-controls-table button, .add-button-table button {
    padding: 6px 12px;
    font-size: 0.8em;
  }
}

a {
  text-decoration: none;
}

.toggle-admin-link {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  border-radius: 5px; /* Reduced border radius for a sharper look */
  cursor: pointer;
  text-decoration: none; /* Remove underline */
  transition: background-color 0.3s, transform 0.2s;
  font-size: 1em;
}

.toggle-admin-link:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Style for admin controls */
#adminControls {
  display: none; /* Hidden by default */
  padding: 20px;
  background-color: var(--background-color);
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-top: 20px;
}

/* Style for admin tables */
.admin-table, .add-button-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.admin-table th, .admin-table td,
.add-button-table th, .add-button-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.admin-table th {
  background-color: var(--secondary-color);
  color: #fff;
}

.add-button-table input[type="text"],
.add-button-table input[type="password"],
.add-button-table input[type="number"] {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
}

.add-button-table button {
  width: 100%;
  padding: 10px;
  background-color: var(--accent-color);
  color: #fff;
  border: none;
  cursor: pointer;
}

.add-button-table button:hover {
  background-color: darken(var(--accent-color), 10%);
}

/* Adjust button styles */
.controls button,
.toggle-admin {
  background-color: var(--secondary-color);
  color: #fff;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
}

.controls button:hover,
.toggle-admin:hover {
  background-color: darken(var(--secondary-color), 10%);
}

.password-prompt-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Dimmed background */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999; /* Ensure it appears above all other content */
  pointer-events: none; /* Prevent interaction with the modal itself */
}

.password-prompt-content {
  background-color: var(--background-color);
  padding: 15px; /* Reduce padding */
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px var(--shadow-color);
  text-align: center;
  width: 80%; /* Reduce width */
  max-width: 300px; /* Reduce max-width */
  pointer-events: auto; /* Allow interaction with the content inside the modal */
}

.password-prompt-content h2 {
  margin-bottom: 20px;
  color: var(--text-color);
  font-size: 1.2em; /* Reduce font size */
}

.password-prompt-content input[type="password"] {
  width: calc(100% - 20px); /* Adjust width to fit within padding */
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  background-color: var(--input-background);
  color: var(--text-color);
  font-size: 1em; /* Ensure consistent font size */
}

.password-prompt-content button {
  padding: 10px 20px;
  background-color: var(--secondary-color);
  color: var(--text-color);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  margin: 5px; /* Add margin to separate buttons */
  font-size: 1em; /* Ensure consistent font size */
}

.password-error {
  color: var(--accent-color);
  margin-top: 10px;
  font-size: 1.1em; /* Increased font size */
}

.password-error {
  color: #e74c3c; /* Red color for error */
  margin-top: 10px;
  font-weight: bold;
  text-align: center;
}

.admin-controls-table, .add-button-table, .add-project-table, .set-password-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.admin-controls-table th, .admin-controls-table td,
.add-button-table th, .add-button-table td,
.add-project-table th, .add-project-table td,
.set-password-table th, .set-password-table td {
  border: 1px solid var(--input-border-color);
  padding: 10px;
  text-align: left;
}

admin-controls-table th, .add-button-table th,
.add-project-table th, .set-password-table th {
  background-color: var(--header-footer-background);
  color: #ffffff;
}

.admin-controls-table input[type="text"],
.admin-controls-table input[type="number"],
.add-button-table input[type="text"],
.add-button-table input[type="password"],
.add-button-table input[type="number"],
.add-project-table input[type="text"],
.set-password-table input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  color: var(--text-color);
}

.admin-controls-table button, .add-button-table button,
.add-project-table button, .set-password-table button {
  padding: 8px 16px;
  background-color: var(--secondary-color);
  color: var(--text-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  max-width: 100%; /* Ensure buttons do not exceed the width of their parent */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.admin-controls-table button:hover, .add-button-table button:hover,
.add-project-table button:hover, .set-password-table button:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

#projectTitle {
  flex: 1;
  white-space: nowrap; /* Prevent text from wrapping */
  overflow: hidden; /* Hide overflow text */
  text-overflow: ellipsis; /* Add ellipsis for overflow text */
  color: #ffffff; /* Ensure project title color is white */
  font-size: calc(18px + 1vw); /* Responsive font size */
}

/* Adjust font size for smaller screens */
@media (max-width: 600px) {
  #projectTitle {
    font-size: calc(14px + 1vw);
  }
}

/* Adjust font size for larger screens */
@media (min-width: 1200px) {
  #projectTitle {
    font-size: calc(18px + 1vw);
  }
}

.set-title-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.set-title-table th, .set-title-table td {
  border: 1px solid var(--input-border-color);
  padding: 10px;
  text-align: left;
}

.set-title-table th {
  background-color: var(--header-footer-background);
  color: #ffffff;
}

.set-title-table input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--input-border-color);
  border-radius: var (--border-radius);
}

.set-title-table button {
  padding: 8px 16px;
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.set-title-table button:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100%;
  background-color: var(--header-footer-background);
  color: #ffffff;
  padding: 10px; /* Reduce padding */
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 1000; /* Ensure it appears above other content */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Ensure content is spaced correctly */
}

.bottom-section {
  margin-top: auto; /* Push the section to the bottom */
}

.admin-project-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-project-table td {
  padding: 10px;
  vertical-align: top; /* Ensure content is aligned to the top */
}

.admin-project-table button {
  width: calc(100% - 20px); /* Adjust width to fit within padding */
  padding: 10px;
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  margin-bottom: 10px; /* Add space between buttons */
  max-width: 100%; /* Ensure buttons do not exceed the width of their parent */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.admin-project-table button:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.admin-project-table td {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 10px;
}

.admin-project-table select,
.admin-project-table input[type="text"],
admin-project-table input[type="password"],
admin-project-table input[type="number"] {
  width: 100%;
  margin-bottom: 10px; /* Add space between elements */
  box-sizing: border-box;
  color:#ffffff;
}

.admin-project-table button {
  width: 100%;
  margin-bottom: 10px; /* Add space between buttons */
}

@media (max-width: 768px) {
  .admin-project-table td {
    padding: 5px;
  }

  .admin-project-table select,
  .admin-project-table input[type="text"],
  .admin-project-table input[type="password"],
  .admin-project-table input[type="number"],
  .admin-project-table button {
    width: calc(100% - 10px); /* Adjust width to fit within padding */
    padding: 5px;
    margin-bottom: 5px; /* Reduce space between elements */
    color:#ffffff;
  }

  .admin-controls-table td,
  .add-button-table td,
  .admin-project-table td {
    padding: 5px;
  }

  .admin-controls-table input[type="text"],
  .admin-controls-table input[type="number"],
  .add-button-table input[type="text"],
  .add-button-table input[type="password"],
  .add-button-table input[type="number"],
  .admin-project-table input[type="text"],
  .admin-project-table input[type="password"],
  .admin-project-table input[type="number"] {
    width: calc(100% - 10px); /* Adjust width to fit within padding */
    padding: 5px;
    margin-bottom: 5px; /* Reduce space between elements */
    color:#ffffff;
  }

  .admin-controls-table button,
  .add-button-table button,
  .admin-project-table button {
    width: calc(100% - 10px); /* Adjust width to fit within padding */
    padding: 8px;
    margin-bottom: 5px; /* Reduce space between buttons */
  }
}

.side-menu.visible {
  transform: translateX(0);
}

.side-menu h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 5px 0; /* Reduce margin */
  font-size: 1.2em; /* Adjust font size */
}

.side-menu h3 .toggle-side-menu {
  margin-left: 10px;
}

.side-menu button {
  width: 100%;
  margin-bottom: 5px; /* Reduce margin */
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 8px; /* Reduce padding */
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  font-size: 0.9em; /* Adjust font size */
}

/* Ensure the close-side-menu button is not overridden */
.side-menu h3 .close-side-menu {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.2em; /* Reduced font size */
  cursor: pointer;
  transition: color 0.3s;
  width: 40px;   /* Set equal width and height */
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-menu h3 .close-side-menu:hover {
  color: var(--highlight-color); /* Orange */
}

.side-menu button.active {
  color: var(--highlight-color); /* Orange */
}

.side-menu button.active:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.side-menu button:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.project-label {
  font-size: 1.2em;
  color: var(--highlight-color);
  margin-top: 10px;
}

.toggle-night-mode, .toggle-side-menu {
  position: absolute;
  top: 10px;
  background-color: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.5em;
  cursor: pointer;
  transition: color 0.3s;
}

.toggle-night-mode:hover, .toggle-side-menu:hover, .close-side-menu:hover {
  color: var(--highlight-color);
}

.toggle-side-menu {
  left: 10px;
  transition: left 0.3s;
}

/* Style the toggle buttons to be square */
.toggle-side-menu,
.toggle-night-mode {
  width: 40px;   /* Set equal width and height */
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  position: absolute;
  top: 50%;               /* Vertically center the buttons */
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Position the side menu toggle on the left */
.toggle-side-menu {
  left: 10px; /* Adjust left position as needed */
}

/* Position the night mode toggle on the right */
.toggle-night-mode {
  right: 10px; /* Adjust right position as needed */
}

/* Adjust the icon size if necessary */
.toggle-side-menu i,
.toggle-night-mode i {
  font-size: 20px; /* Adjust icon size */
}

.close-side-menu {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5em;
  cursor: pointer;
  transition: color 0.3s;
  width: 10px;   /* Set equal width and height */
  height: 10px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-side-menu:hover {
  color: var(--highlight-color); /* Orange */
}

.current-project {
  font-size: 1.2em;
  color: var(--highlight-color);
  margin-top: 10px;
}

#infoPage {
  max-width: 800px;
  margin: 50px auto;
  text-align: center;
  padding: 20px;
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px var(--shadow-color);
  width: 90%; /* Ensure the info page is responsive */
}

#infoPage h2 {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: var(--text-color);
}

#infoPage p {
  font-size: 1.2em;
  line-height: 1.5;
  color: var(--text-color);
}

.image-container {
  margin: 20px 0;
  width: 100%; /* Ensure the image container is responsive */
  max-width: 800px; /* Optional: Set a maximum width */
  display: flex;
  justify-content: center; /* Center the image */
}

.responsive-image {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px var(--shadow-color);
}

.project-counters {
  display: flex;
  justify-content: center; /* Center the counters */
  margin-top: 20px;
  width: 100%; /* Ensure the project counters are responsive */
  max-width: 800px; /* Optional: Set a maximum width */
  align-items: center; /* Center the counters vertically */
}

.counter {
  text-align: center;
  font-size: 2em;
  color: var(--primary-color);
  background-color: var(--background-color);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px var(--shadow-color);
  transition: transform 0.3s;
  margin: 0 10px; /* Add margin between counters */
}

.counter:hover {
  transform: scale(1.05);
}

.counter h3 {
  font-size: 1.2em;
  margin-bottom: 10px;
  color: var(--text-color);
}

/* Media queries for smaller screens */
@media (max-width: 768px) {
  #infoPage {
    padding: 10px;
    margin: 20px auto;
    width: 95%; /* Adjust width for smaller screens */
  }

  #infoPage h2 {
    font-size: 2em;
  }

  #infoPage p {
    font-size: 1em;
  }

  .project-counters {
    flex-direction: column;
    align-items: center;
  }

  .counter {
    margin-bottom: 20px;
    width: 80%;
  }

  .image-container {
    width: 95%; /* Adjust width for smaller screens */
  }
}

@media (max-width: 480px) {
  #infoPage {
    padding: 5px;
    margin: 10px auto;
    width: 95%; /* Adjust width for smaller screens */
  }

  #infoPage h2 {
    font-size: 1.5em;
  }

  #infoPage p {
    font-size: 0.9em;
  }

  .counter {
    font-size: 1.5em;
    padding: 10px;
  }

  .counter h3 {
    font-size: 1em;
  }

  .image-container {
    width: 95%; /* Adjust width for smaller screens */
  }
}

#infoPage {
  max-width: 800px;
  margin: 50px auto;
  text-align: center;
  padding: 20px;
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px var(--shadow-color);
}

#infoPage h2 {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: var(--text-color);
}

#infoPage p {
  font-size: 1.2em;
  line-height: 1.5;
  color: var(--text-color);
}

.image-container {
  margin: 20px 0;
}

.responsive-image {
  text-align: center;
  font-size: 2em;
  color: var(--primary-color);
  background-color: var(--background-color);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px var(--shadow-color);
  transition: transform 0.3s;
}

.project-counters {
  justify-content: space-around;
  margin-top: 20px;
}

.counter {
  text-align: center;
  font-size: 2em;
  color: var(--primary-color);
  background-color: var(--background-color);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px var(--shadow-color);
  transition: transform 0.3s;
}

.counter:hover {
  transform: scale(1.05);
}

.counter h3 {
  font-size: 1.2em;
  margin-bottom: 10px;
  color: var(--text-color);
}

/* Media queries for smaller screens */
@media (max-width: 768px) {
  #infoPage {
    padding: 10px;
    margin: 20px auto;
  }

  #infoPage h2 {
    font-size: 2em;
  }

  #infoPage p {
    font-size: 1em;
  }

  .project-counters {
    flex-direction: column;
    align-items: center;
  }

  .counter {
    margin-bottom: 20px;
    width: 80%;
  }
}

@media (max-width: 480px) {
  #infoPage {
    padding: 5px;
    margin: 10px auto;
  }

  #infoPage h2 {
    font-size: 1.5em;
  }

  #infoPage p {
    font-size: 0.9em;
  }

  .counter {
    font-size: 1.5em;
    padding: 10px;
  }

  .counter h3 {
    font-size: 1em;
  }
}

input, textarea, select, button {
  font-size: 16px; /* Prevent mobile browsers from zooming in */
}

/* Combine shared styles for inputs and dropdowns */
.row-controls input[type="text"],
.row-controls select {
  width: 120px; /* Adjust width as needed */
  padding: 5px;
  margin-right: 5px;
  box-sizing: border-box;
}

input, select, textarea {
  font-size: 16px; /* Ensure inputs have at least 16px font size */
}

/* Include password inputs in the input styles */
input[type="text"],
input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;           /* Match the padding of the dropdown */
  font-size: 1em;          /* Match the font size of the dropdown */
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  background-color: var(--input-background); /* Ensure correct background color */
  color: var(--text-color);
}

/* Remove duplicate styles */
input[type="text"],
input[type="password"],
input[type="number"] {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  background-color: var(--input-background);
  color: var(--text-color);
}

/* Ensure no other styles are overriding the input sizes */
.admin-project-table input[type="text"],
.admin-project-table input[type="password"] {
  width: 100%; /* Ensure both inputs take full width */
  padding: 8px; /* Ensure consistent padding */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  color: var(--text-color);
}

.notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #4caf50;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  opacity: 1;
  transition: opacity 0.5s ease-out;
  z-index: 10000; /* Ensure it appears above the overlay */
  width: auto;
  text-align: center;
  display: inline-block;
}

.error-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #f44336;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  opacity: 1;
  transition: opacity 0.5s ease-out;
  z-index: 10000; /* Ensure it appears above the overlay */
  width: auto;
  text-align: center;
  display: inline-block;
}

.notification.fade-out {
  opacity: 0;
}

.admin-project-table {
  width: 100%; /* Table spans full width */
  border-collapse: collapse;
  margin-bottom: 20px;
}

.admin-project-table td {
  padding: 10px;
}

.admin-project-table td:first-child {
  width: 100%; /* Inputs take 2/3 of the space */
}

.admin-project-table td:last-child {
  width: 100%; /* Buttons take 1/3 of the space */
}

/* Remove duplicate styles */
.admin-project-table input[type="text"],
.admin-project-table input[type="password"],
.admin-project-table input[type="number"] {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  color: var(--text-color);
}

/* Ensure no other styles are overriding the input sizes */
.admin-project-table input[type="text"],
admin-project-table input[type="password"] {
  width: 100%; /* Ensure both inputs take full width */
  padding: 8px; /* Ensure consistent padding */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  color: var(--text-color);
}

.admin-project-table button {
  width: 100%;
  padding: 10px;
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  max-width: 100%; /* Ensure buttons do not exceed the width of their parent */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.admin-project-table button:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.admin-project-table td {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 10px;
}

.admin-project-table button {
  width: 100%;
  margin-bottom: 10px; /* Add space between buttons */
}

@media (max-width: 768px) {
  .admin-project-table td {
    padding: 5px;
  }

  .admin-project-table select,
  .admin-project-table input[type="text"],
  .admin-project-table input[type="password"],
  .admin-project-table input[type="number"],
  .admin-project-table button {
    width: 100%;
    margin-bottom: 5px; /* Reduce space between elements */
    color:#ffffff;
  }
}

.button-container {
  display: flex;
  justify-content: center; /* Center the buttons horizontally */
  gap: 10px; /* Space between buttons */
  margin-top: 10px; /* Optional: space above the buttons */
}

/* Ensure buttons do not take full width */
.button-container button {
  flex: none; /* Prevent buttons from stretching */
}

.button-container {
  display: flex;
  flex-direction: row; /* Ensure horizontal alignment */
  justify-content: center; /* Center the buttons horizontally */
  gap: 10px; /* Space between buttons */
  margin-top: 10px; /* Space above the buttons */
}

.button-container button {
  flex: none; /* Prevent buttons from stretching */
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  background-color: var(--secondary-color);
  color: #fff;
  cursor: pointer;
}

.button-container button:hover {
  background-color: var(--accent-color);
}

.admin-controls-table select,
.admin-controls-table input[type="text"],
admin-controls-table input[type="number"],
.add-button-table select,
.add-button-table input[type="text"],
.add-button-table input[type="password"],
add-button-table input[type="number"] {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  background-color: var(--input-background);
  color: var(--text-color);
  font-size: 1em; /* Ensure consistent font size */
}

.admin-controls-table select,
.add-button-table select {
  height: 40px; /* Match the height of the input fields */
}

.side-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
  display: none; /* Hidden by default */
  z-index: 999; /* Ensure it appears above other content */
}

.side-menu.visible + .side-menu-overlay {
  display: block; /* Show overlay when side menu is visible */
}

.collapsible {
  margin-bottom: 20px;
}

.collapsible-button {
  background-color: var(--secondary-color);
  color: #ffffff;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 1em;
  transition: background-color 0.3s;
}

.collapsible-button:hover {
  background-color: var(--accent-color);
}

.collapsible-content {
  display: none;
  overflow: hidden;
  padding: 10px;
  background-color: var(--input-background);
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  transition: max-height 0.2s ease-out, padding 0.2s ease-out; /* Adjusted transition duration */
  max-height: 0;
}

.collapsible-content.expanded {
  display: block;
  max-height: 1000px; /* Adjust as needed */
  padding: 10px;
}

.collapsible-content table {
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  width: 100%;
  margin-bottom: 20px;
}

.collapsible-content table th,
.collapsible-content table td {
  border: 1px solid var(--input-border-color);
  padding: 10px;
  text-align: left;
}

.collapsible-content table th {
  background-color: var(--header-footer-background);
  color: #ffffff;
}

.collapsible-content table td {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px; /* Add space between elements */
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.collapsible-content table td button {
  flex: 1; /* Allow buttons to take equal space */
  margin: 5px 0; /* Add margin for better spacing */
}

@media (max-width: 768px) {
  .collapsible-content table td {
    flex-direction: column; /* Stack elements vertically on smaller screens */
    align-items: stretch;
  }

  .collapsible-content table td button {
    width: 100%; /* Make buttons full width */
    margin: 5px 0; /* Add margin for better spacing */
  }
}

.admin-project-table input[type="text"],
.admin-project-table input[type="password"] {
  width: 100%; /* Ensure both inputs take full width */
  padding: 8px; /* Ensure consistent padding */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  color: var(--text-color);
}

.compact-form {
  display: flex;
  flex-direction: column; /* Stack elements vertically */
  gap: 5px; /* Reduce space between elements */
  padding: 5px; /* Reduce padding */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.compact-form input[type="text"],
.compact-form input[type="password"] {
  width: 100%; /* Ensure inputs take full width */
  padding: 10px; /* Reduce padding */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  color: var(--text-color);
  font-size: 0.9em; /* Adjust font size */
}

.compact-form button {
  width: 100%; /* Ensure button takes full width */
  padding: 8px; /* Reduce padding */
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  font-size: 0.9em; /* Adjust font size */
  margin-bottom: 10px;
}

.compact-form button:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.bottom-section h3 {
  margin-bottom: 5px; /* Reduce space below the header */
  font-size: 1.2em; /* Adjust font size */
}

.admin-section {
  margin-bottom: 20px;
  padding: 20px;
  background-color: var(--background-color);
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px var(--shadow-color);
}

.admin-section h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.50em;
  color: var(--text-color);
}

.admin-controls-table, .admin-project-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.admin-controls-table th, .admin-controls-table td,
admin-project-table th, .admin-project-table td {
  border: 1px solid var(--input-border-color);
  padding: 10px;
  text-align: left;
}

.admin-controls-table th, .admin-project-table th {
  background-color: var(--header-footer-background);
  color: #ffffff;
}

.admin-controls-table input[type="text"],
admin-controls-table input[type="number"],
admin-project-table input[type="text"],
admin-project-table input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  background-color: var(--input-background);
  color: var(--text-color);
}

.admin-controls-table button, .admin-project-table button {
  padding: 8px 16px;
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.2s;
  max-width: 100%; /* Ensure buttons do not exceed the width of their parent */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.admin-controls-table button:hover, .admin-project-table button:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.collapsible-content {
  display: none;
  padding: 10px;
  border-top: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  transition: max-height 0.2s ease-out, padding 0.2s ease-out;
  max-height: 0;
}

.collapsible-content.expanded {
  display: block;
  max-height: 1000px; /* Adjust as needed */
  padding: 10px;
}

.count-box {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: var(--border-radius);
  font-size: 0.8em;
  font-weight: bold;
  color: #fff;
  margin-left: 5px;
  border-style: solid;
  border-width: 1px;
  border-color: var(--primary-color);
  background-color: var(--primary-color);
}

.count-box.red {
  background-color: rgba(220, 53, 69, 1); /* Red background color */
}

.count-box.orange {
  background-color: rgba(255, 193, 7, 1); /* Orange background color */
}

.count-box.green {
  background-color: rgba(40, 167, 69, 1); /* Green background color */
}

.panel-heading.expanded {
  border-radius: 0;
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}

.project-counters {

  justify-content: space-around;
  margin-top: 20px;
}

.counter {
  text-align: center;
  font-size: 2em;
  color: var(--text-color);
}

.counter h3 {
  font-size: 1.2em;
  margin-bottom: 10px;
}

.no-devices-message {
  text-align: center;
  font-size: 1.2em;
  color: var (--text-color);
  background-color: var(--background-color);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px var(--shadow-color);
  margin-top: 20px;
}

.archived-alert {
  background-color: #f44336; /* Red background color */
  color: white;
  padding: 10px;
  text-align: center;
  font-size: 1.2em;
  position: relative;
  margin-top: 5px;
  margin-bottom: 10px;
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px var(--shadow-color);
}

