/* Poppins + Blue scheme + responsive + modal + small search */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

.inv-wrapper{
  font-family: 'Poppins', sans-serif;
  max-width:1100px;
  margin:18px auto;
  background:#fff;
  padding:14px;
  border-radius:10px;
  box-shadow:0 6px 18px rgba(13,71,161,0.08);
}
.inv-title{ font-weight:600; margin-bottom:12px; color:#0d47a1; }

.inv-cards{ display:flex; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.inv-card{
  flex:1; min-width:140px; padding:12px; border-radius:8px;
  background:#e8f2ff; border:2px solid #1976d2; color:#0b4aa1; text-align:center;
}
.inv-card-title{ text-transform:uppercase; font-size:12px; font-weight:600; opacity:0.9; }
.inv-card-value{ font-size:20px; margin-top:6px; font-weight:700; }

.inv-controls{ display:flex; align-items:center; gap:8px; margin-bottom:10px; justify-content:space-between; flex-wrap:wrap; }
.inv-search{ flex:1; min-width:200px; }
.inv-search input{
  width:100%;
  padding:8px 10px;
  border:2px solid #1976d2;
  border-radius:8px;
  font-family:'Poppins',sans-serif;
}

.inv-actions .btn{ margin-left:6px; padding:8px 10px; border-radius:6px; border:0; cursor:pointer; }
.btn.primary{ background:#1976d2; color:#fff; }
.btn{ background:#f1f5f9; color:#0d47a1; border:1px solid rgba(13,71,161,0.08); }

.table-responsive{ width:100%; overflow-x:auto; margin-top:8px; }
.inv-table{ width:100%; border-collapse:collapse; min-width:820px; }
.inv-table th, .inv-table td{ padding:10px 12px; border-bottom:1px solid #eef4fb; text-align:center; vertical-align:middle; }
.inv-table thead th{ background:#1976d2; color:#fff; font-weight:600; position:sticky; top:0; z-index:1; }
.cell-actions .btn{ margin:0 4px; padding:6px 8px; }

.stock-low .cell-qty, .stock-low .cell-status{ color:#c0392b; font-weight:700; }
.stock-ok .cell-qty, .stock-ok .cell-status{ color:#2e7d32; font-weight:700; }
.stock-zero .cell-qty, .stock-zero .cell-status{ color:#7f8c8d; font-weight:700; text-decoration:line-through; }

/* modal */
.inv-modal{ display:none; position:fixed; inset:0; background:rgba(0,0,0,0.4); align-items:center; justify-content:center; padding:20px; }
.inv-modal-content{ background:#fff; padding:16px; border-radius:10px; width:100%; max-width:520px; position:relative; box-shadow:0 8px 30px rgba(0,0,0,0.15); }
.inv-modal-close{ position:absolute; right:12px; top:8px; border:0; background:transparent; font-size:22px; cursor:pointer; }
.inv-modal label{ display:block; margin-bottom:8px; font-size:13px; }
.inv-modal input{ width:100%; padding:8px; border:1px solid #dfeaf9; border-radius:6px; margin-top:6px; }

/* responsive */
@media(max-width:900px){
  .inv-cards{ flex-direction:column; }
  .inv-actions{ margin-top:8px; width:100%; display:flex; justify-content:flex-end; }
}
@media(max-width:600px){
  .inv-modal-content{ padding:12px; }
  .inv-table thead th{ font-size:12px; }
  .inv-table td{ font-size:13px; padding:8px; }
}

/* === Popup Correct Center Styling (Final Fix) === */
.inv-modal {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.inv-modal.active {
  display: flex; /* show only when active class is added */
}

.inv-modal-content {
  background: #fff;
  width: 500px;
  max-width: 90%;
  padding: 20px;
  border-radius: 8px;
  position: relative;
}

.inv-modal-close,
.inv-modal-cancel {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}
/* ===============================
   Report Modal (Owner Dashboard)
=============================== */
#inv-report-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.65);
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

#inv-report-modal[aria-hidden="false"] {
  display: flex;
}

#inv-report-box {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  width: 90%;
  max-width: 700px;
  padding: 20px;
  animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#inv-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  margin-bottom: 15px;
}

#inv-report-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

#inv-report-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #999;
}

#inv-report-body {
  max-height: 60vh;
  overflow-y: auto;
}

#inv-report-body table {
  width: 100%;
  border-collapse: collapse;
}

#inv-report-body th,
#inv-report-body td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  font-size: 14px;
  text-align: left;
}

#inv-report-body th {
  background: #f3f3f3;
  font-weight: 600;
}

#inv-report-body tr:nth-child(even) {
  background: #fafafa;
}
