/* ==========================================================
   PESTICIDE INVENTORY — Desktop Management Page
   Custom styles beyond Tailwind utilities.
   ========================================================== */

/* --- SCROLLBAR HIDE --- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* --- MODAL ANIMATIONS --- */
.modal-fade-in { animation: modalFadeIn 0.15s ease-out forwards; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-pop-in { animation: modalPopIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.97) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== MODAL SHELL (matches Operator page) ===== */
.detail-shell {
  width: 1010px;
  max-width: calc(100vw - 54px);
  height: 652px;
  max-height: calc(100vh - 54px);
}
@media (max-width: 1180px) {
  .detail-shell { width: 980px; max-width: calc(100vw - 30px); height: 644px; max-height: calc(100vh - 30px); }
}
@media (max-width: 1024px) {
  .detail-shell { width: 960px; max-width: calc(100vw - 22px); height: 640px; max-height: calc(100vh - 22px); }
}
@media (max-width: 820px) {
  .detail-shell { width: calc(100vw - 14px); max-width: calc(100vw - 14px); height: calc(100vh - 14px); max-height: calc(100vh - 14px); }
}

/* --- PRODUCT LIST ROW --- */
.prod-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  border: 1px solid transparent;
}
.prod-row:hover { background: rgba(0,0,0,0.03); }
.dark .prod-row:hover { background: rgba(255,255,255,0.04); }

.prod-row.active {
  background: rgba(59,128,48,0.12);
  border-color: #3b8030;
}
.dark .prod-row.active {
  background: rgba(59,130,246,0.08);
  border-color: #3b82f6;
}

/* --- FORM INPUT --- */
.pest-input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid #e3e0d3;
  background: #fcfcfb;
  color: #2d2a26;
  outline: none;
  transition: border-color 0.2s;
}
.pest-input:focus { border-color: #3b8030; }
.dark .pest-input {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: #f1f5f9;
}
.dark .pest-input:focus { border-color: #3b82f6; }

/* --- FORM LABEL --- */
.pest-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b665f;
  margin-bottom: 3px;
}
.dark .pest-label { color: #64748b; }

/* --- PURCHASE HISTORY TABLE --- */
.purchase-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.purchase-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b665f;
  padding: 5px 8px;
  border-bottom: 1px solid #e3e0d3;
}
.dark .purchase-table th {
  color: #64748b;
  border-bottom-color: rgba(255,255,255,0.08);
}
.purchase-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #f0ede6;
  vertical-align: middle;
}
.dark .purchase-table td { border-bottom-color: rgba(255,255,255,0.04); }

/* --- RECEIPT THUMBNAIL --- */
.receipt-thumb {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid #e3e0d3;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.receipt-thumb:hover { border-color: #3b8030; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.dark .receipt-thumb { border-color: rgba(255,255,255,0.08); }
.dark .receipt-thumb:hover { border-color: #3b82f6; box-shadow: 0 2px 6px rgba(0,0,0,0.3); }

/* --- DETAIL PANEL ENTRANCE --- */
.detail-fade-in {
  animation: detailFade 0.25s ease-out both;
}
@keyframes detailFade {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* --- USAGE INPUT GLOW --- */
.usage-input-glow {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 2px 8px rgba(59, 130, 246, 0.1);
}
.dark .usage-input-glow {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 2px 8px rgba(59, 130, 246, 0.1);
}

/* --- STAT CHIP --- */
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
