/* =========================================================
   HidroFarm - Components CSS
   Reusable UI component styles
   ========================================================= */

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  outline: none;
  font-family: var(--font-family);
}

.btn:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--green-700);
  color: var(--white);
  border-color: var(--green-700);
}
.btn-primary:hover {
  background: var(--green-800);
  border-color: var(--green-800);
  box-shadow: 0 4px 12px rgba(45,106,79,0.3);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }

.btn-secondary {
  background: transparent;
  color: var(--green-700);
  border-color: var(--green-700);
}
.btn-secondary:hover {
  background: var(--green-50);
  box-shadow: var(--shadow-sm);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.btn-danger:hover {
  background: #DC2626;
  border-color: #DC2626;
  box-shadow: 0 4px 12px rgba(239,68,68,0.3);
  transform: translateY(-1px);
}

.btn-warning {
  background: var(--warning);
  color: var(--white);
  border-color: var(--warning);
}
.btn-warning:hover {
  background: #D97706;
  border-color: #D97706;
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.btn-light {
  background: var(--gray-100);
  color: var(--gray-700);
  border-color: var(--gray-200);
}
.btn-light:hover {
  background: var(--gray-200);
}

/* Sizes */
.btn-xs  { padding: 4px 10px; font-size: var(--font-size-xs); border-radius: var(--radius-sm); }
.btn-sm  { padding: 6px 14px; font-size: var(--font-size-xs); }
.btn-lg  { padding: 12px 24px; font-size: var(--font-size-md); border-radius: var(--radius-lg); }
.btn-xl  { padding: 14px 32px; font-size: var(--font-size-lg); border-radius: var(--radius-lg); }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  font-size: 1rem;
  flex-shrink: 0;
}

.btn-icon.btn-sm { width: 28px; height: 28px; font-size: 0.85rem; }
.btn-icon.btn-lg { width: 44px; height: 44px; font-size: 1.2rem; }
.btn-icon.rounded-full { border-radius: 50%; }

.btn-group {
  display: inline-flex;
  gap: 0;
}
.btn-group .btn { border-radius: 0; border-right-width: 0; }
.btn-group .btn:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.btn-group .btn:last-child  { border-radius: 0 var(--radius-md) var(--radius-md) 0; border-right-width: 1.5px; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Stat Card ───────────────────────────────────────────── */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-card-icon.green  { background: var(--green-100); }
.stat-card-icon.yellow { background: var(--warning-bg); }
.stat-card-icon.red    { background: var(--danger-bg); }
.stat-card-icon.blue   { background: var(--info-bg); }
.stat-card-icon.purple { background: var(--purple-bg); }

.stat-card-content { flex: 1; min-width: 0; }

.stat-card-value {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-card-label {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
  font-weight: 500;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card-trend {
  font-size: var(--font-size-xs);
  font-weight: 600;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.stat-card-trend.up   { color: var(--green-700); }
.stat-card-trend.down { color: var(--danger); }
.stat-card-trend.neutral { color: var(--gray-500); }

/* ── Forms ───────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group:last-child { margin-bottom: 0; }

.form-label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-label .required {
  color: var(--danger);
  font-size: 0.9em;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  font-size: var(--font-size-sm);
  color: var(--gray-800);
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  line-height: 1.5;
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-family);
}

.form-control:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(82,183,136,0.15);
}

.form-control:disabled {
  background: var(--gray-100);
  color: var(--gray-500);
  cursor: not-allowed;
}

.form-control.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.form-control.success {
  border-color: var(--green-600);
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-helper {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
}

.form-error {
  font-size: var(--font-size-xs);
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-section {
  margin-bottom: 24px;
}

.form-section-title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Input Group (icon + input) */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .input-group-icon {
  position: absolute;
  left: 10px;
  color: var(--gray-400);
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 1;
}

.input-group .form-control { padding-left: 34px; }
.input-group .input-group-suffix {
  position: absolute;
  right: 12px;
  font-size: var(--font-size-xs);
  color: var(--gray-500);
  font-weight: 500;
}

/* ── Modal ───────────────────────────────────────────────── */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(2px);
  animation: fadeInOverlay var(--transition-fast) ease;
}

#modal-overlay.hidden {
  display: none !important;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInModal 0.2s ease;
}

@keyframes slideInModal {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.modal-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--gray-900);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  background: var(--gray-50);
}

/* ── Toast ───────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: var(--font-size-sm);
  font-weight: 500;
  min-width: 280px;
  max-width: 400px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition: all 0.25s ease;
  pointer-events: auto;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-success { border-left: 4px solid var(--green-600); }
.toast-error   { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info    { border-left: 4px solid var(--info); }

.toast-icon  { font-size: 1.1rem; flex-shrink: 0; }
.toast-msg   { flex: 1; color: var(--gray-800); }

/* ── Table ───────────────────────────────────────────────── */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  background: var(--white);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--gray-50); }
.table-striped tbody tr:nth-child(even) { background: var(--gray-50); }
.table-striped tbody tr:nth-child(even):hover { background: var(--green-50); }

.table .actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.table th.text-right,
.table td.text-right { text-align: right; }
.table th.text-center,
.table td.text-center { text-align: center; }

/* ── Tabs ────────────────────────────────────────────────── */
.tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tab-list {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-list::-webkit-scrollbar { display: none; }

.tab-item {
  padding: 10px 18px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.tab-item:hover { color: var(--green-700); }

.tab-item.active {
  color: var(--green-700);
  border-bottom-color: var(--green-700);
}

.tab-panel { display: none; padding: 20px 0; }
.tab-panel.active { display: block; }

/* ── Badge ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1.4;
}

.badge-success { background: var(--green-100); color: var(--green-800); }
.badge-warning { background: var(--warning-bg); color: #92400E; }
.badge-danger  { background: var(--danger-bg);  color: #991B1B; }
.badge-info    { background: var(--info-bg);    color: #1E40AF; }
.badge-purple  { background: var(--purple-bg);  color: #5B21B6; }
.badge-gray    { background: var(--gray-100);   color: var(--gray-600); }
.badge-dark    { background: var(--gray-800);   color: var(--white); }

.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Progress Bar ────────────────────────────────────────── */
.progress-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: var(--gray-500);
  font-weight: 500;
}

.progress-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar.thin  { height: 4px; }
.progress-bar.thick { height: 14px; }

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--green-600);
  transition: width 0.6s ease;
  min-width: 4px;
}

.progress-fill.warning { background: var(--warning); }
.progress-fill.danger  { background: var(--danger); }
.progress-fill.info    { background: var(--info); }
.progress-fill.purple  { background: var(--purple); }

/* ── Tag ─────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  white-space: nowrap;
}

.tag-green  { background: var(--green-50); color: var(--green-800); border-color: var(--green-200); }
.tag-blue   { background: var(--info-bg); color: #1E40AF; border-color: #BFDBFE; }
.tag-yellow { background: var(--warning-bg); color: #92400E; border-color: #FDE68A; }
.tag-red    { background: var(--danger-bg); color: #991B1B; border-color: #FECACA; }

/* ── Search Box ──────────────────────────────────────────── */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box-icon {
  position: absolute;
  left: 10px;
  font-size: 0.9rem;
  color: var(--gray-400);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  font-size: var(--font-size-sm);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--gray-800);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  font-family: var(--font-family);
}

.search-box input:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(82,183,136,0.15);
}

.search-box input::placeholder { color: var(--gray-400); }

/* ── Dropdown ────────────────────────────────────────────── */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  overflow: hidden;
  display: none;
  animation: dropdownIn 0.15s ease;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-menu.open { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: var(--font-size-sm);
  color: var(--gray-700);
  cursor: pointer;
  transition: background var(--transition-fast);
  width: 100%;
  border: none;
  background: none;
  font-family: var(--font-family);
  text-align: left;
}

.dropdown-item:hover { background: var(--gray-50); color: var(--gray-900); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-bg); }

.dropdown-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 4px 0;
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  gap: 12px;
}

.empty-state-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 4px;
}

.empty-state h3 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--gray-700);
}

.empty-state p {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  max-width: 340px;
}

/* ── Chart Container ─────────────────────────────────────── */
.chart-container {
  position: relative;
  width: 100%;
}

.chart-container canvas {
  max-width: 100%;
}

/* ── Tooltip ─────────────────────────────────────────────── */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-800);
  color: var(--white);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 1000;
}

[data-tooltip]:hover::after { opacity: 1; }

/* ── Lang Toggle ─────────────────────────────────────────── */
.lang-toggle {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  flex: 1;
  padding: 5px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  color: var(--green-200);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: 0.03em;
  white-space: nowrap;
  font-family: var(--font-family);
}

.lang-btn.active {
  background: var(--white);
  color: var(--green-800);
  box-shadow: var(--shadow-xs);
}

.lang-btn:not(.active):hover {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-header-info {}

.page-header-title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
}

.page-header-sub {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  margin-top: 4px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── Section Title ───────────────────────────────────────── */
.section-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
  margin-left: 8px;
}

/* ── Info Box ────────────────────────────────────────────── */
.info-box {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid transparent;
}

.info-box-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }

.info-box.success { background: var(--green-50); border-color: var(--green-200); color: var(--green-800); }
.info-box.warning { background: var(--warning-bg); border-color: #FDE68A; color: #92400E; }
.info-box.danger  { background: var(--danger-bg); border-color: #FECACA; color: #991B1B; }
.info-box.info    { background: var(--info-bg); border-color: #BFDBFE; color: #1E40AF; }

/* ── Key-Value List ──────────────────────────────────────── */
.kv-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kv-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: var(--font-size-sm);
}

.kv-key {
  color: var(--gray-500);
  font-weight: 500;
  flex-shrink: 0;
}

.kv-value {
  color: var(--gray-800);
  font-weight: 600;
  text-align: right;
}

/* ── Scrollable List ─────────────────────────────────────── */
.scroll-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-200) transparent;
}

.scroll-list::-webkit-scrollbar { width: 4px; }
.scroll-list::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

/* ── List Item ───────────────────────────────────────────── */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.list-item:hover {
  border-color: var(--green-200);
  background: var(--green-50);
  box-shadow: var(--shadow-sm);
}

.list-item-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border-radius: var(--radius-md);
}

.list-item-content { flex: 1; min-width: 0; }
.list-item-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-sub {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
  margin-top: 2px;
}
.list-item-right { flex-shrink: 0; text-align: right; }

/* ── pH/EC Status Indicator ──────────────────────────────── */
.ph-indicator, .ec-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.indicator-dot.good    { background: var(--green-600); }
.indicator-dot.warning { background: var(--warning); }
.indicator-dot.danger  { background: var(--danger); }

/* ── Plant Status Colors ─────────────────────────────────── */
.status-semai      { background: var(--info-bg); color: #1E40AF; }
.status-transplant { background: var(--purple-bg); color: #5B21B6; }
.status-vegetatif  { background: var(--green-100); color: var(--green-800); }
.status-ready      { background: var(--warning-bg); color: #92400E; }
.status-harvested  { background: var(--gray-100); color: var(--gray-600); }

/* ── Quick Action Row ────────────────────────────────────── */
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 0;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 20px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-family);
  flex: 1;
  min-width: 100px;
}

.quick-action-btn:hover {
  border-color: var(--green-400);
  background: var(--green-50);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.quick-action-btn .qab-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.quick-action-btn .qab-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gray-600);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

/* ── Range Indicator ─────────────────────────────────────── */
.range-bar {
  position: relative;
  height: 6px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  margin: 4px 0;
}

.range-bar-fill {
  position: absolute;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--green-500);
}

.range-bar-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--green-700);
  box-shadow: var(--shadow-sm);
}

/* ── Toggle Switch ───────────────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  left: 3px;
  top: 3px;
  transition: transform var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider { background: var(--green-600); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── Stats Grid ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* ── Two Column Layout ───────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.two-col-main { grid-column: 1; }
.two-col-side { grid-column: 2; }

@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col-main,
  .two-col-side { grid-column: 1; }
}

/* ── Sidebar Logo (inline with main.css sidebar styles) ───── */
/* Already in main.css but add extra details here */

/* ── Page Fade Animation ─────────────────────────────────── */
#main-content > * {
  animation: pageFadeIn 0.2s ease;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Number Input Stepper ────────────────────────────────── */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] { -moz-appearance: textfield; }

/* ── Color Swatch ────────────────────────────────────────── */
.color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Reminder Item ───────────────────────────────────────── */
.reminder-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.reminder-item.completed {
  opacity: 0.6;
  background: var(--gray-50);
}

.reminder-item:hover { box-shadow: var(--shadow-sm); border-color: var(--green-200); }

.reminder-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--gray-300);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  background: var(--white);
}

.reminder-checkbox.checked {
  background: var(--green-600);
  border-color: var(--green-600);
  color: var(--white);
}

/* ── Filter Bar ──────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-chip {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-600);
  background: var(--white);
  transition: all var(--transition-fast);
  user-select: none;
  font-family: var(--font-family);
}

.filter-chip:hover {
  border-color: var(--green-400);
  color: var(--green-700);
  background: var(--green-50);
}

.filter-chip.active {
  background: var(--green-700);
  border-color: var(--green-700);
  color: var(--white);
}

/* ── Summary Row ─────────────────────────────────────────── */
.summary-row {
  display: flex;
  gap: 20px;
  padding: 16px 20px;
  background: var(--green-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--green-200);
  flex-wrap: wrap;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-item-label {
  font-size: var(--font-size-xs);
  color: var(--green-700);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-item-value {
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--green-800);
  font-variant-numeric: tabular-nums;
}

/* ── Responsive Overrides ────────────────────────────────── */
@media (max-width: 768px) {
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header-actions { justify-content: flex-start; }
  .two-col { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .modal { border-radius: var(--radius-lg); }
  #toast-container { right: 12px; bottom: 12px; left: 12px; }
  .toast { min-width: auto; max-width: 100%; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .quick-actions { gap: 8px; }
  .tab-item { padding: 8px 12px; font-size: 0.7rem; }
}
