*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  font-size: 16px;
  background: #f4f7f2;
  color: #1a1a1a;
}

/* ── Navigation ── */
.nav {
  background: #2d6a1f;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: contain;
  background: white;
  padding: 2px;
}

.nav-title {
  color: #e8f5e2;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.season-badge {
  background: #f0a500;
  color: #4a2800;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  position: relative;
}

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #e8f5e2;
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── Dropdown Menu ── */
.nav-menu {
  display: none;
  position: absolute;
  top: 56px;
  right: 0;
  background: white;
  border: 0.5px solid #ddd;
  border-radius: 0 0 10px 10px;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 99;
}

.nav-menu.open {
  display: block;
}

.nav-menu a {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 14px;
  border-bottom: 0.5px solid #f0f0f0;
}

.nav-menu a:hover {
  background: #f4f7f2;
  color: #2d6a1f;
}
.nav-menu a.active {
  color: #2d6a1f;
  font-weight: 500;
}
.nav-menu a.nav-logout {
  color: #c0392b;
}
.nav-menu a.nav-logout:hover {
  background: #fdf0f0;
}
.nav-menu .nav-divider {
  border-bottom: 1px solid #ddd;
  margin: 4px 0;
}

/* ── Season dropdown ── */
.season-menu {
  display: none;
  position: absolute;
  top: 56px;
  right: 48px;
  background: white;
  border: 0.5px solid #ddd;
  border-radius: 0 0 10px 10px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 99;
}

.season-menu.open {
  display: block;
}

.season-menu a {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 13px;
  border-bottom: 0.5px solid #f0f0f0;
  cursor: pointer;
}

.season-menu a:hover {
  background: #f4f7f2;
  color: #2d6a1f;
}
.season-menu a.current-season {
  font-weight: 500;
  color: #2d6a1f;
}

/* ── Read-only banner ── */
.readonly-banner {
  display: none;
  background: #c0392b;
  color: white;
  text-align: center;
  padding: 8px;
  font-size: 13px;
  font-weight: 500;
}

.readonly-banner.visible {
  display: block;
}

/* ── Page layout ── */
.page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-title {
  font-size: 20px;
  font-weight: 500;
  color: #1a1a1a;
}

/* ── Cards ── */
.card {
  background: white;
  border: 0.5px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

/* ── Buttons ── */
.btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  border: 0.5px solid #ccc;
  background: white;
  color: #1a1a1a;
  transition: background 0.15s;
}

.btn:hover {
  background: #f4f7f2;
}

.btn-primary {
  background: #2d6a1f;
  color: white;
  border-color: #2d6a1f;
}

.btn-primary:hover {
  background: #3a8528;
}

.btn-danger {
  background: white;
  color: #c0392b;
  border-color: #c0392b;
}

.btn-danger:hover {
  background: #fdf0f0;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Forms ── */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 4px;
}

.form-control {
  width: 100%;
  padding: 8px 10px;
  border: 0.5px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  color: #1a1a1a;
  background: white;
}

.form-control:focus {
  outline: none;
  border-color: #2d6a1f;
  box-shadow: 0 0 0 2px rgba(45, 106, 31, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Tables ── */
.table-wrap {
  border: 0.5px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  background: #f0f7ec;
  color: #2d6a1f;
  font-weight: 500;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 0.5px solid #ddd;
}

td {
  padding: 10px 14px;
  border-bottom: 0.5px solid #f0f0f0;
  color: #1a1a1a;
}

tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: #f9fbf8;
}

/* ── Category headers in tables ── */
.category-row td {
  background: #e8f5e2;
  color: #2d6a1f;
  font-weight: 500;
  font-size: 13px;
  padding: 6px 14px;
}

/* ── Search and filter bar ── */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input {
  padding: 8px 12px;
  border: 0.5px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  min-width: 200px;
  flex: 1;
}

.search-input:focus {
  outline: none;
  border-color: #2d6a1f;
  box-shadow: 0 0 0 2px rgba(45, 106, 31, 0.15);
}

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
}

.badge-green {
  background: #e0f0d4;
  color: #2d6a1f;
}
.badge-amber {
  background: #fef3d0;
  color: #7a4a00;
}
.badge-red {
  background: #fdf0f0;
  color: #c0392b;
}
.badge-gray {
  background: #f0f0f0;
  color: #555;
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: white;
  border-radius: 10px;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #888;
  line-height: 1;
}

.modal-close:hover {
  color: #1a1a1a;
}

.modal-divider {
  border: none;
  border-top: 0.5px solid #ddd;
  margin: 16px 0;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.pagination button {
  padding: 6px 12px;
  border: 0.5px solid #ccc;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 13px;
}

.pagination button:hover {
  background: #f4f7f2;
}
.pagination button.active {
  background: #2d6a1f;
  color: white;
  border-color: #2d6a1f;
}
.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 13px;
  color: #555;
}

/* ── Stat cards ── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  background: #f4f7f2;
  border-radius: 8px;
  padding: 14px;
}

.stat-label {
  font-size: 12px;
  color: #555;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 22px;
  font-weight: 500;
  color: #2d6a1f;
}

/* ── Qty input ── */
.qty-input {
  width: 70px;
  padding: 6px 8px;
  border: 0.5px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
}

.qty-input:focus {
  outline: none;
  border-color: #2d6a1f;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .filter-bar {
    flex-direction: column;
  }
  .nav-title {
    display: none;
  }
}

.category-toggle {
  font-size: 12px;
  margin-right: 6px;
  display: inline-block;
  width: 12px;
}

.plant-qty.unpicked {
  background: #e8f5e2;
  color: #2d6a1f;
  border: 2px solid #2d6a1f;
  cursor: pointer;
}

.plant-qty.picked {
  background: #2d6a1f;
  color: white;
  border: 2px solid #2d6a1f;
  cursor: pointer;
}
