/* Batch22 · trend scope and PromotionPrice calculation policy */

.promo-price-policy {
  margin: 14px 0;
  padding: 18px;
  border: 1px solid #cfe0ff;
  border-radius: 16px;
  background: linear-gradient(145deg, #f7faff 0%, #fff 68%);
  box-shadow: 0 8px 24px rgba(42, 89, 160, .07);
}

.promo-price-policy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.promo-price-policy-head > div {
  display: grid;
  gap: 4px;
}

.promo-price-policy-head span,
.promo-policy-label {
  color: #2f5f9e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.promo-price-policy-head b {
  color: #172b4d;
  font-size: 18px;
}

.promo-price-policy-head small,
.promo-excluded-products > small {
  color: #66758c;
  line-height: 1.65;
}

.promo-price-policy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr);
  gap: 18px;
}

.promo-store-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 8px;
}

.promo-store-check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 52px;
  padding: 9px 11px;
  border: 1px solid #dce6f5;
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.promo-store-check:hover {
  border-color: #83aef2;
  box-shadow: 0 5px 14px rgba(62, 109, 184, .12);
  transform: translateY(-1px);
}

.promo-store-check input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  accent-color: #2f75db;
}

.promo-store-check span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.promo-store-check b,
.promo-store-check small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-store-check b { color: #213654; }
.promo-store-check small { color: #7a889d; font-size: 11px; }

.promo-excluded-products {
  display: grid;
  align-content: start;
  gap: 8px;
}

.promo-excluded-products textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  border: 1px solid #ccd9ec;
  border-radius: 11px;
  padding: 10px 12px;
  background: #fff;
  color: #213654;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  box-sizing: border-box;
}

.promo-excluded-products textarea:focus {
  outline: none;
  border-color: #4c87df;
  box-shadow: 0 0 0 3px rgba(76, 135, 223, .14);
}

.promo-credential-vault {
  margin: 14px 0;
  padding: 18px;
  border: 1px solid #d8d9f6;
  border-radius: 16px;
  background: linear-gradient(145deg, #f9f8ff 0%, #fff 72%);
  box-shadow: 0 8px 24px rgba(75, 65, 170, .07);
}

.promo-credential-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.promo-credential-head > div { display: grid; gap: 4px; }
.promo-credential-head span { color: #6255b8; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.promo-credential-head b { color: #27234d; font-size: 18px; }
.promo-credential-head small { color: #6d6b86; line-height: 1.65; }
.promo-credential-head > em { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; background: #f1efff; color: #6558b5; font-size: 12px; font-style: normal; font-weight: 800; }
.promo-credential-head > em.ok { background: #e8f8f0; color: #197652; }
.promo-credential-head > em.error { background: #fff0f2; color: #b82e48; }

.promo-credential-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.promo-credential-row { display: grid; grid-template-columns: minmax(140px, .8fr) minmax(180px, 1.2fr) minmax(180px, 1.2fr) auto; align-items: end; gap: 10px; min-width: 0; padding: 12px; border: 1px solid #e2e2f3; border-radius: 13px; background: #fff; }
.promo-credential-row.configured { border-color: #bfe2d2; background: linear-gradient(145deg, #fff, #f6fcf9); }
.promo-credential-title { display: grid; min-width: 0; gap: 2px; align-self: center; }
.promo-credential-title b { color: #282547; font-size: 14px; }
.promo-credential-title span { overflow: hidden; color: #666a7e; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.promo-credential-title em { color: #a16a13; font-size: 11px; font-style: normal; font-weight: 700; }
.promo-credential-row.configured .promo-credential-title em { color: #1c7a57; }
.promo-credential-row label { display: grid; min-width: 0; gap: 5px; color: #696b7d; font-size: 11px; font-weight: 700; }
.promo-credential-row input { width: 100%; min-width: 0; height: 38px; box-sizing: border-box; border: 1px solid #d7d9e8; border-radius: 9px; padding: 0 10px; background: #fff; color: #24263a; }
.promo-credential-row input:focus { outline: none; border-color: #7366d7; box-shadow: 0 0 0 3px rgba(115, 102, 215, .13); }
.promo-credential-actions { display: flex; gap: 6px; align-items: center; min-height: 38px; }

@media (max-width: 1500px) {
  .promo-credential-grid { grid-template-columns: 1fr; }
}

#controlCellTrendScope {
  min-width: 150px;
}

.quantity-live-day {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 10px;
  line-height: 1.5;
  vertical-align: middle;
}

@media (max-width: 1100px) {
  .promo-store-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .promo-price-policy { padding: 14px; }
  .promo-price-policy-head { display: grid; }
  .promo-price-policy-head button { width: 100%; }
  .promo-price-policy-grid { grid-template-columns: 1fr; }
  .promo-store-check-grid { grid-template-columns: 1fr; }
  .promo-credential-vault { padding: 14px; }
  .promo-credential-head { display: grid; }
  .promo-credential-head > em { justify-self: start; }
  .promo-credential-row { grid-template-columns: 1fr; align-items: stretch; }
  .promo-credential-actions button { flex: 1; }
}
