body {
  font-family: Arial, sans-serif;
  margin: 20px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  padding: 10px 0;
}

nav a {
  margin-right: 15px;
  text-decoration: none;
  color: black;
}

nav a.active {
  font-weight: bold;
  color: #3defa9;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  margin-top: 10px;
}

th {
    background-color: #012d2c;
    position: sticky;
    top: 0;
    z-index: 3;
}

.sticky-table-header {
  position: fixed;
  display: none;
  overflow: hidden;
  z-index: 90;
  pointer-events: none;
}

.sticky-table-header table {
  width: max-content;
  margin: 0;
  table-layout: fixed;
}

.sticky-table-header th {
  box-sizing: border-box;
}

.table-horizontal-scrollbar {
  position: fixed;
  bottom: 0;
  display: none;
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  z-index: 95;
  background: #f3f4f6;
  border-top: 1px solid #b8b8b8;
}

.table-horizontal-scrollbar-content {
  height: 1px;
}

th, td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: center;
  white-space: nowrap;
}

thead {
    color: #3defa9;
}

/* Keep Actions and Plant ID visible while the table scrolls horizontally. */
th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  min-width: 145px;
  width: 145px;
}

th:nth-child(2),
td:nth-child(2) {
  position: sticky;
  left: 162px;
  min-width: 150px;
  width: 150px;
}

tbody td:first-child,
tbody td:nth-child(2) {
  z-index: 2;
  background: white;
}

thead th:first-child,
thead th:nth-child(2) {
  z-index: 5;
  background: #012d2c;
}

td:nth-child(2),
th:nth-child(2) {
  box-shadow: 3px 0 4px -3px rgba(0, 0, 0, 0.45);
}

button {
  padding: 5px 10px;
  margin: 5px;
}

.table-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

#plant-search {
  padding: 6px 10px;
  font-size: 14px;
  width: 220px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 20px;
  width: 80%;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 8px;
}

.modal-content h3 {
  margin-top: 0;
}

.modal-content label {
  display: block;
  font-weight: bold;
  margin-top: 10px;
}

.modal-content input {
  width: 100%;
  padding: 6px;
  margin-top: 4px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: #555;
}

.modal-close:hover {
  color: #000;
}

.modal-content {
  position: relative; /* REQUIRED for absolute close button */
}

.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.field-type {
  font-size: 12px;
  color: #888;
  margin-left: 6px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #1f2937;
  color: white;
}

.nav-left {
  display: flex;
  gap: 12px;
}

.logout-btn {
  background: transparent;
  border: none;
  color: black;
  font-size: 25px;
  cursor: pointer;
}

.logout-btn:hover {
  color: #f87171;
}

.hidden {
  display: none !important;
}

.form-row-inline {
    display: grid;
    grid-template-columns: 350px 1fr;
    /* align-items: center; */
    text-align: right;
    gap: 12px;
    margin-bottom: 10px;
}

.form-row-inline label {
    font-weight: 550;
    white-space: nowrap;
}

.form-row-inline input {
    width: 100%;
    height: 36px;
    padding: 6px 10px;
    /* text-align: right; */
    font-size: 14px;
    box-sizing: border-box;
}

.field-type {
    font-size: 12px;
    color: #777;
    margin-left: 6px;
}





