/* =========================================================
   ALFAA ERP - PREMIUM PRODUCT CATEGORY / UNIT MANAGER
   ========================================================= */
.product-master-managed-field {
  display: flex !important;
  flex-direction: column;
  align-self: stretch;
}

.manage-product-master-btn,
.product-master-action-spacer {
  width: 100%;
  height: 46px;
  margin-top: 12px;
  border-radius: 12px;
}

.manage-product-master-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #a7f3d0;
  color: #047857;
  background: #ecfdf5;
  font: 750 14px/1 "Inter", Arial, sans-serif;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.manage-product-master-btn:hover {
  border-color: #6ee7b7;
  background: #d1fae5;
  box-shadow: 0 8px 18px rgba(16,185,129,.12);
}
.product-master-action-spacer { display: block; visibility: hidden; }

.product-master-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 22000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15,23,42,.56);
  backdrop-filter: blur(5px);
}
.product-master-modal-backdrop[hidden] { display: none; }

.product-master-modal {
  display: flex;
  flex-direction: column;
  width: min(720px, calc(100vw - 36px));
  max-height: min(84dvh, 740px);
  border: 1px solid #e2e8f0;
  border-radius: 21px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 32px 78px rgba(15,23,42,.25);
}
.product-master-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 25px 20px;
  border-bottom: 1px solid #e2e8f0;
}
.product-master-modal-title { display: flex; gap: 14px; align-items: center; }
.product-master-modal-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  color: #047857;
  background: #ecfdf5;
  font-size: 20px;
}
.product-master-modal-title h2 {
  margin: 0 0 5px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.03em;
}
.product-master-modal-title p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}
.product-master-close {
  display: grid; place-items: center;
  width: 47px; height: 47px;
  border: 1px solid #dbe4ee;
  border-radius: 13px;
  color: #334155; background: #fff;
  font-size: 18px; cursor: pointer;
}
.product-master-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 22px 25px 18px;
  scrollbar-width: none;
}
.product-master-modal-body::-webkit-scrollbar { display: none; }
.product-master-add-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
  margin-bottom: 18px;
}
.product-master-add-row input {
  height: 56px;
  border: 1px solid #d6e1ee;
  border-radius: 14px;
  padding: 0 16px;
  color: #0f172a;
  font: 600 15px/1 "Inter", Arial, sans-serif;
}
.product-master-add-row input:focus {
  outline: 2px solid rgba(16,185,129,.18);
  border-color: #10b981;
}
.product-master-add-row button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 14px;
  color: #fff; background: #10b981;
  font: 750 15px/1 "Inter", Arial, sans-serif;
  cursor: pointer;
}
.product-master-add-row button:hover { background: #059669; }
.product-master-rows { display: grid; gap: 11px; }
.product-master-row {
  display: grid;
  grid-template-columns: 36px 1fr 48px 48px;
  gap: 9px;
  align-items: center;
  min-height: 67px;
  padding: 8px 12px 8px 13px;
  border: 1px solid #dfe7f1;
  border-radius: 15px;
  background: #fbfdff;
}
.product-master-row-icon {
  display: grid; place-items: center;
  color: #10b981; font-size: 17px;
}
.product-master-row input {
  min-width: 0;
  height: 46px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 11px;
  color: #1e293b;
  background: transparent;
  font: 700 14px/1 "Inter", Arial, sans-serif;
}
.product-master-row input:focus {
  outline: none;
  border-color: #a7f3d0;
  background: #fff;
}
.product-master-row button {
  display: grid; place-items: center;
  height: 46px; border-radius: 12px;
  background: #fff; cursor: pointer;
  font-size: 16px;
}
.product-master-edit { border: 1px solid #a7f3d0; color: #047857; }
.product-master-delete { border: 1px solid #fecaca; color: #dc2626; background: #fff7f7 !important; }
.product-master-empty { padding: 22px; color: #64748b; text-align: center; }
.product-master-modal-footer {
  padding: 17px 25px;
  border-top: 1px solid #e2e8f0;
  text-align: right;
}
.product-master-modal-footer button {
  height: 48px; min-width: 150px;
  border: 1px solid #d3ddec; border-radius: 13px;
  color: #0f172a; background: #fff;
  font: 750 14px/1 "Inter", Arial, sans-serif;
  cursor: pointer;
}
.qty-serial-controlled {
  color: #64748b !important;
  background: #f8fafc !important;
  cursor: not-allowed !important;
}
.qty-serial-hint {
  display: block;
  margin-top: 7px;
  color: #059669;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 650;
}
