/* 流量包卡片 / 激活弹窗（quota.css 拆分的 packages 部分） */
/* ---------- 服务流量包 ---------- */
.flow-price {
  width: min(1240px, 100%);
  margin: 22px auto 0;
  padding: 26px 28px 28px;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 20, 30, .05);
}

.flow-price h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: #1f2329;
  line-height: 1.3;
}

.flow-price-note {
  margin: 0;
  color: #8a919f;
  font-size: 13px;
  line-height: 1.8;
}

/* 区块头：标题+说明在左，统一「使用激活码开通」入口在右（激活码本身决定包种，逐包按钮反而误导） */
.flow-price-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.flow-price-head .flow-activate {
  margin: 0;
  flex: none;
  padding: 0 22px;
}

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

.flow-item {
  --fc: #2f6fed;
  --fc-soft: #eaf1ff;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 18px;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  transition: box-shadow .18s ease, border-color .18s ease;
}

.flow-item:nth-child(2) { --fc: #7048c8; --fc-soft: #f1ebfd; }
.flow-item:nth-child(3) { --fc: #0e9f6e; --fc-soft: #e2f6ee; }
.flow-item:nth-child(4) { --fc: #d97a06; --fc-soft: #fdf1df; }

.flow-item:hover {
  border-color: #d8dfe9;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}

.flow-discount {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  min-width: 44px;
  padding: 3px 9px 4px;
  border-radius: 6px;
  color: #fff;
  background: #e5484d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  letter-spacing: .02em;
}

.flow-discount::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 8px;
  border: 4px solid transparent;
  border-top-color: #d6373b;
  border-left-color: #d6373b;
  border-radius: 0 0 0 2px;
}

.flow-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 46px;
  min-height: 42px;
}

.flow-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  color: var(--fc);
  background: var(--fc-soft);
}

.flow-item-title {
  margin: 0;
  color: #1f2329;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
}

.flow-item-sub {
  margin: 14px 0 0;
  color: #667085;
  font-size: 12.5px;
  line-height: 1.8;
  word-break: break-word;
}

.flow-item-sub b {
  display: inline-block;
  margin-right: 6px;
  padding: 0 8px;
  border-radius: 999px;
  color: #5f6b80;
  background: #f0f2f6;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.8;
  vertical-align: 1px;
}

.flow-price-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.flow-price-main {
  color: #e5484d;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.flow-price-main i {
  margin-right: 2px;
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  vertical-align: 2px;
}

.flow-price-unit {
  color: #5f6b80;
  font-size: 12px;
  font-weight: 600;
}

.flow-origin {
  margin-left: auto;
  color: #98a2b3;
  font-size: 12px;
  text-decoration: line-through;
}

.flow-activate {
  min-height: 40px;
  margin-top: 16px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #1684fc;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  transition: background .15s ease, box-shadow .15s ease;
}

.flow-activate:hover {
  background: #0d72e8;
  box-shadow: 0 2px 6px rgba(22, 132, 252, .25);
}

.flow-activate:focus-visible { outline: 2px solid rgba(47, 111, 237, .45); outline-offset: 2px; }

/* ---------- QPS 包卡片 ---------- */
/* 与流量包同排展示（同为 5 折角标），按服务单独售卖 */
.flow-item:nth-child(5) { --fc: #0b7285; --fc-soft: #e2f2f5; }

/* QPS 卡价格区间较长：主价格收窄字号、单位不换行；容器允许换行，原价整行落到价格下方，避免挤作一团 */
.flow-item-qps .flow-price-main { font-size: 24px; }
.flow-item-qps .flow-price-unit { white-space: nowrap; }
.flow-item-qps .flow-price-info { flex-wrap: wrap; row-gap: 2px; }
.flow-item-qps .flow-origin { flex-basis: 100%; margin-left: 0; }

/* 激活弹窗 */
.flow-overlay {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, .45);
}

.flow-modal {
  width: min(400px, 100%);
  padding: 22px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
}

.flow-modal h3 { margin: 0 0 4px; font-size: 17px; }

.flow-modal-hint {
  margin: 0 0 14px;
  color: #8a919f;
  font-size: 12.5px;
  line-height: 1.7;
}

.flow-modal label {
  display: block;
  margin: 10px 0 5px;
  color: #4a5364;
  font-size: 13px;
}

.flow-modal input {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid #d9dee8;
  border-radius: 8px;
  font-size: 14px;
}

.flow-modal input:focus {
  outline: none;
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .16);
}

.flow-modal-err {
  margin-top: 10px;
  color: #e5484d;
  font-size: 13px;
}

.flow-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.flow-modal-actions button {
  min-height: 36px;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.flow-cancel {
  border: 1px solid #d9dee8;
  color: #4a5364;
  background: #fff;
}

.flow-submit {
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, #3f7cf2, #2f6fed);
}

.flow-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  color: #1a7f37;
  background: #e6f6ee;
  font-size: 11px;
  font-weight: 400;
  vertical-align: 1px;
}

.quota-note {
  width: min(1240px, 100%);
  margin: 14px auto 0 !important;
  color: #8a919f;
  font-size: 12px;
}

/* ---------- 轻提示（开通成功等全局反馈） ---------- */
.toast {
  position: fixed;
  z-index: 70;
  bottom: 28px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: min(480px, calc(100vw - 32px));
  padding: 11px 18px;
  border-radius: 10px;
  color: #fff;
  background: #1a9e63;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
  font-size: 13px;
  line-height: 1.55;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast svg { flex: none; }

.hidden { display: none !important; }

@media (max-width: 680px) {
  .flow-price { padding: 18px 14px; }
  .flow-grid { grid-template-columns: 1fr; }
  body.quota-page { padding: 20px 12px 40px; }
  .quota-card { padding: 24px 18px; }
  .meta-item { flex: 1 1 100%; }
  .quota-result { border-radius: 8px; }
  .quota-table { min-width: 980px; }
  .usage-bar { width: 110px; }
}