body {
  height: 100vh;
  margin: 0;
}

a {
  text-decoration: none;
}

.navbar {
  z-index: 2001 !important;
}

.modal {
  margin-top: 56px;
}

.card-custom {
  background-color: #fff;
  color: #000;
  border: 1px solid #000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  margin-bottom: 20px;
  max-width: 100%;
  min-width: 300px;
  max-height: 300px;
  min-height: 300px;
  height: auto;
  overflow-y: auto;
  line-height: 1.6;
}

.card-header-custom {
  background-color: #fff;
  color: #000;
  border-bottom: 1px solid #000;
  font-weight: bold !important;
  text-align: center !important;
  font-size: 1.2rem !important;
}

.card-body {
  font-size: 0.85rem !important;
}

.card-body li {
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: break-word;
}

.card-body ul {
  display: block;
}

.card-body li {
  display: list-item !important;
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: break-word;
}

.weather-icon {
  width: 40px;
  height: 40px;
}

.card-body {
  font-size: 0.9rem;
}

#seedVaultContent .card,
#plantsContent .card,
#inventoryContent .card {
  min-width: 100% !important;
  max-width: 100% !important;
}

.fa-pagelines,
.fa-circle-check {
  color: green;
}

.fa-basket-shopping,
.fa-square-check,
.fa-tags,
.fa-chart-bar,
.fa-list-check {
  color: grey;
}

.fa-virus-covid,
.fa-grip {
  color: red;
}

.fa-video,
.fa-images {
  color: purple;
}

.fa-triangle-exclamation {
  color: orange;
}

.fa-tools,
.fa-list {
  color: cadetblue;
}

.fa-moon,
.fa-cloud-moon {
  color: rgb(129, 129, 251);
}

.fa-sun {
  color: rgb(240, 221, 71);
}

.fa-seedling,
.fa-leaf {
  color: green;
}

.fa-calendar-days {
  color: rgb(44, 44, 201);
}

.fa-database {
  color: #caa053;
}

.emoji {
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  height: 1.5rem;
}

.window-content {
  padding: 10px;
}

.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
}

.icon-btn {
  border: none;
  background: none;
  color: #555;
}

.icon-btn:hover {
  color: #000;
}

td,
th {
  vertical-align: middle;
  cursor: pointer;
}

.table {
  max-width: 1000px;
  margin: auto;
  border: 1px solid #000;
  box-shadow: 2px 2px 2px;
}

.table th.sortable,
th {
  cursor: pointer;
}

.table th {
  text-align: center;
}

.table td,
.table th {
  vertical-align: middle;
}

.table td.description {
  white-space: normal;
  text-align: center;
}

.table td.amount,
.table td.photo {
  text-align: center;
}

.photo-container {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.photo-container img {
  max-width: 100%;
  height: 300px;
}

.photo-container button {
  position: absolute;
  top: 10px;
  right: 10px;
}

.table th.sortable {
  cursor: pointer;
}

.table th {
  text-align: center;
}

.table td,
.table th {
  white-space: nowrap;
  vertical-align: middle;
}

.table td.description {
  white-space: normal;
  text-align: center;
}

.table-container {
  max-width: 1000px;
  margin: auto;
}

.table td.amount,
.table td.photo {
  text-align: center;
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 220px;
  background-color: #f8f9fa;
  position: fixed;
  top: 56px;
  left: 0;
  border-right: 1px solid #dee2e6;
  transition: transform 0.3s ease;
  padding-bottom: 1rem;
  z-index: 2000;
}

.sidebar .nav-link {
  color: #000 !important;
}

.content {
  margin-left: 220px;
  margin-top: 56px;
}

body.dark-mode {
  background-color: #121212;
  color: #999;
}

body.dark-mode p {
  color: #ffffff;
}

body.dark-mode .card-text {
  color: #666;
}

body.dark-mode .fa-skull,
body.dark-mode .fa-skull-crossbones {
  color: #fff !important;
}

body.dark-mode .btn-close {
  filter: invert(1);
}

body.dark-mode .sidebar {
  background-color: rgb(33, 37, 41);
}

body.dark-mode .card-custom,
body.dark-mode .card-header-custom,
body.dark-mode .modal-content {
  background-color: #1e1e1e;
  color: #e0e0e0;
  border-color: #444;
}

body.dark-mode .card-header-custom {
  border-bottom-color: #444;
}

body.dark-mode .plant-card, body.dark-mode .seed-card {
  background-color: #1e1e1e;
  border-color: #444;
  color: #e0e0e0;
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.05);
}

body.dark-mode .dead-plant-card {
  background-color: #1e1e1e;
  border-color: #ff0000;
  color: #e0e0e0;
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.05);
}

body.dark-mode .plant-gen {
  color: #aaa;
}
body.dark-mode a,
body.dark-mode .nav-link {
  color: #fff !important;
}

body.dark-mode .pagination,
body.dark-mode .paginate_button,
body.dark-mode a.page-link {
  color: #000 !important;
}

body.dark-mode .nav-link.active {
  color: #fff !important;
  background-color: #333 !important;
}

body.dark-mode .table,
body.dark-mode .table th,
body.dark-mode .table td {
  background-color: #222;
  color: #ddd;
  border-color: #444;
}

body.dark-mode .btn-outline-dark {
  border-color: #fff;
  color: #fff;
}

body.dark-mode .photo-container {
  background-color: #222;
}

@media (max-width: 576px) {
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table th,
  .table td {
    font-size: 0.7rem;
    padding: 0.25rem 0.4rem;
    word-break: break-word;
  }

  .table td i {
    font-size: 1rem;
  }

  .table td.name,
  .table td.description {
    white-space: normal;
  }

  .modal-dialog {
    margin: 0.5rem auto;
    max-width: 100%;
  }

  .photo-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    top: 56px;
    left: 0;
    width: 80vw;
    max-width: 240px;
    height: calc(100vh - 56px);
    background: #fff;
    z-index: 2000;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-in-out;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .content {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    top: 56px;
    left: 0;
    width: 80vw;
    max-width: 240px;
    height: calc(100vh - 56px);
    background: #fff;
    z-index: 2000;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-in-out;
  }

  .sidebar.active {
    transform: translateX(0);
  }
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table th,
  .table td {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
    word-break: break-word;
  }

  .table td.name,
  .table td.description {
    white-space: normal;
  }

  .photo-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .modal-dialog {
    margin: 1rem auto;
    max-width: 95%;
  }

  .modal-content {
    width: 100%;
  }

  .content {
    margin-left: 0;
  }
}

@media (max-width: 800px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    top: 56px;
    left: 0;
    width: 80vw;
    max-width: 240px;
    height: calc(100vh - 56px);
    background: #fff;
    z-index: 2000;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-in-out;
  }

  .sidebar.active {
    transform: translateX(0);
  }
  .navbar-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    padding: 0;
    list-style: none;
  }

  .navbar-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    min-width: 60px;
    font-size: 0.9rem;
  }

  .card-custom {
    max-width: 100%;
    min-width: 100%;
  }

  .card-custom li {
    font-size: 0.95rem;
  }
}
