/* 邀请好友面板重排：只覆盖展示，不改数据与业务事件 */
.ipw { box-sizing: border-box !important; max-width: 100% !important; padding: 0 16px 92px !important; }
.ipw .ip-card {
  background: #fff !important;
  border: 1px solid #e7edf6 !important;
  border-radius: 18px !important;
  box-shadow: 0 6px 24px rgba(23, 34, 63, .06) !important;
  padding: 10px 14px 14px !important;
}
.ipw .ip-head {
  display: flex !important;
  align-items: flex-start !important;
  flex-wrap: wrap !important;
  gap: 6px 8px !important;
  padding: 4px 2px 10px !important;
  font-size: 21px !important;
  font-weight: 800 !important;
  letter-spacing: -.02em !important;
  color: #142033 !important;
}
.ipw .ip-head > .ip-icobtn { display: none !important; }
.ipw #ip-sub {
  margin-left: auto !important;
  align-self: center !important;
  background: #eef4ff !important;
  color: #2563eb !important;
  border: 1px solid #dbe7ff !important;
  border-radius: 999px !important;
  padding: 3px 9px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  white-space: nowrap !important;
}
.ipw .ir-subtitle {
  flex-basis: 100% !important;
  margin: 0 0 2px !important;
  color: #6b7a90 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
}
.ipw #ip-hint-btn, .ipw #ip-suggest-btn, .ipw #ip-copy-link,
.ipw #ip-app, .ipw .ip-app { display: none !important; }
.ipw .ip-btn.pp-entry:not(#ip-poster-make) { display: none !important; }
.ipw #ip-note { display: none !important; }
.ipw #ip-stats, .ipw #ip-buckets, .ipw #ip-growth { display: none !important; }

.ipw .ir-kpis {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 2px 0 12px !important;
}
.ipw .ir-kpi {
  min-width: 0;
  padding: 12px 13px 11px;
  border: 1px solid #e8edf5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(22, 34, 51, .035);
}
.ipw .ir-kpi b {
  display: block;
  color: #142033;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.02em;
}
.ipw .ir-kpi span {
  display: block;
  margin-top: 3px;
  color: #7b8799;
  font-size: 11px;
  line-height: 1.3;
}
.ipw .ir-kpi.ok { border-color: #dceee4; background: #f7fcf9; }
.ipw .ir-kpi.ok b { color: #16834b; }
.ipw .ir-kpi.wait { border-color: #f2e6cf; background: #fffaf1; }
.ipw .ir-kpi.wait b { color: #b7791f; }
.ipw .ir-kpi.today { border-color: #dce8ff; background: #f7faff; }
.ipw .ir-kpi.today b { color: #2563eb; }

.ipw .ip-linkrow {
  display: flex !important;
  align-items: stretch !important;
  gap: 8px !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  background: transparent !important;
}
.ipw .ip-link {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 11px !important;
  height: 42px !important;
  border: 1px solid #e2e9f3 !important;
  border-radius: 10px !important;
  background: #fff !important;
}
.ipw #ip-link-txt {
  display: block !important;
  width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #526277 !important;
  font-size: 11px !important;
}
.ipw .ir-copy {
  flex: 0 0 84px !important;
  height: 42px !important;
  border: 1px solid #dbe7ff !important;
  border-radius: 10px !important;
  background: #eef4ff !important;
  color: #2563eb !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}
.ipw .ir-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin: 10px 0 !important;
}
.ipw .ir-actions .ip-btn {
  width: 100% !important;
  height: 43px !important;
  margin: 0 !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}
.ipw .ir-progress {
  margin: 2px 0 12px !important;
  padding: 12px 14px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #f7f9fc !important;
}
.ipw .ir-progress-top {
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
  color: #526277 !important;
  font-size: 11px !important;
}
.ipw .ir-progress-top b { color: #2563eb !important; font-size: 12px !important; }
.ipw .ir-bar {
  height: 7px !important;
  margin-top: 8px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: #edf1f7 !important;
}
.ipw .ir-bar > i {
  display: block !important;
  height: 100% !important;
  width: 0;
  border-radius: inherit !important;
  background: linear-gradient(90deg, #4f8df7, #2f6fe4) !important;
  transition: width .25s ease !important;
}
.ipw .ir-sec {
  margin: 14px 2px 7px !important;
  color: #142033 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.ipw .ip-ladderbox {
  margin: 0 0 12px !important;
  padding: 10px 12px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #f7f9fc !important;
}
.ipw .ip-ladder {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  height: auto !important;
}
.ipw .ip-lad {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  min-height: 40px !important;
  padding: 7px 8px !important;
  border-radius: 9px !important;
  background: #f8fafc !important;
}
.ipw .ip-lad.is-active { background: #f0fdf4 !important; }
.ipw .ip-lad.is-locked { opacity: .92 !important; }
.ipw .ip-lad-n {
  flex: 0 0 22px !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #e8eef7 !important;
  color: #65758b !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}
.ipw .ip-lad.is-active .ip-lad-n { background: #16834b !important; color: #fff !important; }
.ipw .ip-lad-m { min-width: 0 !important; flex: 1 !important; }
.ipw .ip-lad-h { display: flex !important; align-items: baseline !important; justify-content: space-between !important; gap: 8px !important; }
.ipw .ip-lad-lb { color: #26364b !important; font-size: 12px !important; font-weight: 700 !important; }
.ipw .ip-lad-st { color: #8a97a8 !important; font-size: 10px !important; white-space: nowrap !important; }
.ipw .ip-lad.is-active .ip-lad-st { color: #16834b !important; }
.ipw .ip-lad-sub { display: block !important; margin-top: 2px !important; color: #8a97a8 !important; font-size: 10px !important; line-height: 1.35 !important; }

.ipw .ip-listbox {
  margin: 0 0 12px !important;
  padding: 10px 12px 12px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #f7f9fc !important;
}
.ipw .ip-listhead { padding: 2px 0 5px !important; }
.ipw .ip-listhead .ip-lt { color: #142033 !important; font-size: 13px !important; font-weight: 800 !important; }
.ipw .ip-listwrap { max-height: none !important; overflow: visible !important; }
.ipw .ip-list { display: flex !important; flex-direction: column !important; gap: 0 !important; }
.ipw .ip-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 57px !important;
  padding: 9px 0 !important;
  border-bottom: 1px solid #eef2f7 !important;
}
.ipw .ip-row:last-child { border-bottom: 0 !important; }
.ipw .ip-ava {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 9px !important;
  background: #f0f4fa !important;
  color: #6c7a8d !important;
  font-size: 11px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.ipw .ip-rmain { min-width: 0 !important; flex: 1 !important; }
.ipw .ip-rname { color: #26364b !important; font-size: 12px !important; font-weight: 700 !important; }
.ipw .ip-rmeta { display: flex !important; flex-wrap: wrap !important; gap: 3px 6px !important; margin-top: 2px !important; }
.ipw .ip-mono { max-width: 100% !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; color: #8a97a8 !important; font-size: 10px !important; }
.ipw .ip-tag {
  display: inline-flex !important;
  align-items: center !important;
  max-width: 150px !important;
  min-height: 20px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.ipw .ip-tag.status.dim { background: #f2f4f7 !important; color: #7c8797 !important; }
.ipw .ip-tag.status.ok { background: #eaf8ef !important; color: #16834b !important; }
.ipw .ip-tag.status.bad { background: #fff2f0 !important; color: #b84a3a !important; }
.ipw .ip-list.ir-collapsed .ip-row:nth-child(n+7) { display: none !important; }
.ipw .ir-list-toggle {
  width: 100% !important;
  height: 38px !important;
  margin-top: 7px !important;
  border: 1px solid #e2e9f3 !important;
  border-radius: 9px !important;
  background: #f8fafc !important;
  color: #526277 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}
.ipw .ir-rules {
  margin: 0 0 4px !important;
  padding: 10px 14px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #f7f9fc !important;
  color: #8a97a8 !important;
  font-size: 11px !important;
  line-height: 1.65 !important;
}
.ipw .ir-rules summary {
  color: #526277 !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  list-style: none !important;
}
.ipw .ir-rules summary::-webkit-details-marker { display: none !important; }
.ipw .ir-rules summary::after { content: " +"; color: #9aa6b5 !important; }
.ipw .ir-rules[open] summary::after { content: " −"; }
.ipw .ir-rules p { margin: 7px 0 0 !important; }

@media (min-width: 560px) {
  .ipw .ir-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .ipw .ir-actions { grid-template-columns: 1fr 1fr !important; max-width: 460px !important; }
}

/* 2026-11-12 ???????????????????????????? */
#agh-cl-card { display: none !important; }

/* 2026-11-12 ?????????????????????????????? */
.ag-inv-toggle { display: none !important; }

/* 2026-11-13 feedback 0a9989a7：卡内收起/展开 + 暗色主题 */
.ipw .ir-card-toggle {
  flex: 0 0 auto !important;
  margin-left: 6px !important;
  padding: 4px 11px !important;
  border: 1px solid #e2e9f3 !important;
  border-radius: 999px !important;
  background: #f7f9fc !important;
  color: #526277 !important;
  font: inherit !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
}
.ipw .ip-card.ir-card-collapsed {
  padding-bottom: 9px !important;
}
.ipw .ip-card.ir-card-collapsed > :not(.ip-head) {
  display: none !important;
}

/* 暗色：用户手动选暗色 */
html[data-theme="dark"] .ipw .ip-card {
  background: #1b2434 !important;
  border-color: #33405a !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .28) !important;
}
html[data-theme="dark"] .ipw .ip-head,
html[data-theme="dark"] .ipw .ip-title,
html[data-theme="dark"] .ipw .ir-sec,
html[data-theme="dark"] .ipw .ip-lt,
html[data-theme="dark"] .ipw .ip-rname,
html[data-theme="dark"] .ipw .ip-lad-lb,
html[data-theme="dark"] .ipw .ir-kpi b {
  color: #e8eef7 !important;
}
html[data-theme="dark"] .ipw .ir-subtitle,
html[data-theme="dark"] .ipw .ir-kpi span,
html[data-theme="dark"] .ipw .ip-mono,
html[data-theme="dark"] .ipw .ip-lad-st,
html[data-theme="dark"] .ipw .ip-lad-sub,
html[data-theme="dark"] .ipw .ir-rules {
  color: #9fb0c6 !important;
}
html[data-theme="dark"] .ipw .ir-kpi,
html[data-theme="dark"] .ipw .ip-link,
html[data-theme="dark"] .ipw .ir-progress,
html[data-theme="dark"] .ipw .ip-ladderbox,
html[data-theme="dark"] .ipw .ip-listbox,
html[data-theme="dark"] .ipw .ip-lad,
html[data-theme="dark"] .ipw .ir-rules,
html[data-theme="dark"] .ipw .ir-list-toggle {
  background: #232b3d !important;
  border-color: #33405a !important;
}
html[data-theme="dark"] .ipw .ir-kpi.ok { background: #1d3329 !important; border-color: #2b5a42 !important; }
html[data-theme="dark"] .ipw .ir-kpi.wait { background: #332b1d !important; border-color: #5a4a2b !important; }
html[data-theme="dark"] .ipw .ir-kpi.today { background: #1d2a3f !important; border-color: #2b4560 !important; }
html[data-theme="dark"] .ipw .ip-link,
html[data-theme="dark"] .ipw .ir-list-toggle { border-color: #3a465e !important; }
html[data-theme="dark"] .ipw #ip-link-txt { color: #cbd5e1 !important; }
html[data-theme="dark"] .ipw .ir-copy {
  background: #1e3a5f !important;
  border-color: #2d5a8a !important;
  color: #93c5fd !important;
}
html[data-theme="dark"] .ipw #ip-sub {
  background: #1e3a5f !important;
  border-color: #2d5a8a !important;
  color: #93c5fd !important;
}
html[data-theme="dark"] .ipw .ir-bar { background: #2c374a !important; }
html[data-theme="dark"] .ipw .ip-row { border-bottom-color: #2f3a4f !important; }
html[data-theme="dark"] .ipw .ip-ava { background: #2a3448 !important; color: #9fb0c6 !important; }
html[data-theme="dark"] .ipw .ip-lad { background: #232b3d !important; }
html[data-theme="dark"] .ipw .ip-lad.is-active { background: #1d3329 !important; }
html[data-theme="dark"] .ipw .ip-tag.status.dim { background: #2c374a !important; color: #9fb0c6 !important; }
html[data-theme="dark"] .ipw .ip-tag.status.ok { background: #1d3329 !important; color: #6ee7b7 !important; }
html[data-theme="dark"] .ipw .ip-tag.status.bad { background: #3a2327 !important; color: #fda4af !important; }
html[data-theme="dark"] .ipw .ir-card-toggle {
  background: #232b3d !important;
  border-color: #3a465e !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .ipw .ir-rules summary,
html[data-theme="dark"] .ipw .ir-list-toggle { color: #cbd5e1 !important; }

/* 暗色：跟随系统（未手动选浅色） */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .ipw .ip-card {
    background: #1b2434 !important;
    border-color: #33405a !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .28) !important;
  }
  html:not([data-theme="light"]) .ipw .ip-head,
  html:not([data-theme="light"]) .ipw .ip-title,
  html:not([data-theme="light"]) .ipw .ir-sec,
  html:not([data-theme="light"]) .ipw .ip-lt,
  html:not([data-theme="light"]) .ipw .ip-rname,
  html:not([data-theme="light"]) .ipw .ip-lad-lb,
  html:not([data-theme="light"]) .ipw .ir-kpi b {
    color: #e8eef7 !important;
  }
  html:not([data-theme="light"]) .ipw .ir-subtitle,
  html:not([data-theme="light"]) .ipw .ir-kpi span,
  html:not([data-theme="light"]) .ipw .ip-mono,
  html:not([data-theme="light"]) .ipw .ip-lad-st,
  html:not([data-theme="light"]) .ipw .ip-lad-sub,
  html:not([data-theme="light"]) .ipw .ir-rules {
    color: #9fb0c6 !important;
  }
  html:not([data-theme="light"]) .ipw .ir-kpi,
  html:not([data-theme="light"]) .ipw .ip-link,
  html:not([data-theme="light"]) .ipw .ir-progress,
  html:not([data-theme="light"]) .ipw .ip-ladderbox,
  html:not([data-theme="light"]) .ipw .ip-listbox,
  html:not([data-theme="light"]) .ipw .ip-lad,
  html:not([data-theme="light"]) .ipw .ir-rules,
  html:not([data-theme="light"]) .ipw .ir-list-toggle {
    background: #232b3d !important;
    border-color: #33405a !important;
  }
  html:not([data-theme="light"]) .ipw .ir-kpi.ok { background: #1d3329 !important; border-color: #2b5a42 !important; }
  html:not([data-theme="light"]) .ipw .ir-kpi.wait { background: #332b1d !important; border-color: #5a4a2b !important; }
  html:not([data-theme="light"]) .ipw .ir-kpi.today { background: #1d2a3f !important; border-color: #2b4560 !important; }
  html:not([data-theme="light"]) .ipw .ip-link,
  html:not([data-theme="light"]) .ipw .ir-list-toggle { border-color: #3a465e !important; }
  html:not([data-theme="light"]) .ipw #ip-link-txt { color: #cbd5e1 !important; }
  html:not([data-theme="light"]) .ipw .ir-copy {
    background: #1e3a5f !important;
    border-color: #2d5a8a !important;
    color: #93c5fd !important;
  }
  html:not([data-theme="light"]) .ipw #ip-sub {
    background: #1e3a5f !important;
    border-color: #2d5a8a !important;
    color: #93c5fd !important;
  }
  html:not([data-theme="light"]) .ipw .ir-bar { background: #2c374a !important; }
  html:not([data-theme="light"]) .ipw .ip-row { border-bottom-color: #2f3a4f !important; }
  html:not([data-theme="light"]) .ipw .ip-ava { background: #2a3448 !important; color: #9fb0c6 !important; }
  html:not([data-theme="light"]) .ipw .ip-lad { background: #232b3d !important; }
  html:not([data-theme="light"]) .ipw .ip-lad.is-active { background: #1d3329 !important; }
  html:not([data-theme="light"]) .ipw .ip-tag.status.dim { background: #2c374a !important; color: #9fb0c6 !important; }
  html:not([data-theme="light"]) .ipw .ip-tag.status.ok { background: #1d3329 !important; color: #6ee7b7 !important; }
  html:not([data-theme="light"]) .ipw .ip-tag.status.bad { background: #3a2327 !important; color: #fda4af !important; }
  html:not([data-theme="light"]) .ipw .ir-card-toggle {
    background: #232b3d !important;
    border-color: #3a465e !important;
    color: #cbd5e1 !important;
  }
  html:not([data-theme="light"]) .ipw .ir-rules summary,
  html:not([data-theme="light"]) .ipw .ir-list-toggle { color: #cbd5e1 !important; }
}
