/* Keep activity-type column horizontal */
td[class*="7c3aed"],
th[class*="7c3aed"] {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: nowrap !important;
  min-width: 5.5em;
  letter-spacing: normal !important;
}

/* Always remove React "新" badges; PRD numbers come from outer annotation layer */
span.absolute.rounded-full[class*="7c3aed"],
span.absolute.-top-2\.5,
.absolute.-top-2\.5.rounded-full {
  display: none !important;
}

/*
  PRD mode: neutralize built-in purple borders so only the outer
  annotation layer draws one dashed box + number badge.
  活动类型：表头保留灰底；数据单元格恢复列表白底。
*/
html:not(.admin-proto-clean) th[class*="7c3aed"],
html:not(.admin-proto-clean) td[class*="7c3aed"],
html:not(.admin-proto-clean) [class*="border-l-[#7c3aed]"],
html:not(.admin-proto-clean) [class*="border-r-[#7c3aed]"],
html:not(.admin-proto-clean) [class*="border-[#7c3aed]"] {
  border-color: #ebeef5 !important;
  border-style: solid !important;
  border-width: 1px !important;
  color: #303133 !important;
}

html:not(.admin-proto-clean) th[class*="7c3aed"] {
  background: #f5f7fa !important;
}

/* 默认白底；行悬停/选中时与整行统一浅灰，避免活动类型列局部留白 */
html:not(.admin-proto-clean) td[class*="7c3aed"] {
  background: #fff !important;
}

html:not(.admin-proto-clean) .border-2[class*="7c3aed"],
html:not(.admin-proto-clean) [class*="border-2"][class*="7c3aed"] {
  border-color: #dcdfe6 !important;
  border-style: solid !important;
  border-width: 1px !important;
  background: #fff !important;
}

html:not(.admin-proto-clean) tbody tr:hover > td[class*="7c3aed"],
html:not(.admin-proto-clean) tbody tr.bg-\[\#f5f7fa\] > td[class*="7c3aed"],
html:not(.admin-proto-clean) tbody tr.current-row > td[class*="7c3aed"],
html:not(.admin-proto-clean) tbody tr:hover > [class*="border-2"][class*="7c3aed"],
html:not(.admin-proto-clean) tbody tr.bg-\[\#f5f7fa\] > [class*="border-2"][class*="7c3aed"],
html:not(.admin-proto-clean) tbody tr.current-row > [class*="border-2"][class*="7c3aed"] {
  background: #f5f7fa !important;
}

/* 表头灰色不受行选中/悬停影响 */
html:not(.admin-proto-clean) thead th[class*="7c3aed"],
html:not(.admin-proto-clean) thead [class*="border-2"][class*="7c3aed"] {
  background: #f5f7fa !important;
}

html:not(.admin-proto-clean) [class*="text-[#7c3aed]"] {
  color: #303133 !important;
}

html:not(.admin-proto-clean) [class*="bg-[#f5f3ff]"],
html:not(.admin-proto-clean) [class*="f5f3ff"],
html:not(.admin-proto-clean) [class*="faf8ff"] {
  background: #fff !important;
}

/* Clean prototype: strip purple review marks */
html.admin-proto-clean [class*="7c3aed"] {
  border-color: #ebeef5 !important;
  color: #303133 !important;
}

html.admin-proto-clean [class*="bg-[#f5f3ff]"],
html.admin-proto-clean [class*="f5f3ff"],
html.admin-proto-clean [class*="faf8ff"] {
  background: #f5f7fa !important;
}

html.admin-proto-clean .border-2[class*="7c3aed"] {
  border-width: 1px !important;
  border-color: #dcdfe6 !important;
  padding-top: 0.75rem !important;
}

html.admin-proto-clean [class*="text-[#7c3aed]"] {
  color: #303133 !important;
}

/* Prototype always shows expanded AP Gateway sidebar in the doc iframe */
aside.z-40.flex.shrink-0.flex-col {
  width: 232px !important;
  overflow: visible !important;
  border-right-width: 1px !important;
}

/*
  AP后台统一壳内嵌：只保留业务主区，隐藏 iframe 内重复的顶栏与左侧菜单。
  外层壳已提供 AP 中文顶栏 + AP Gateway 菜单。
*/
html.ap-shell-embed > body > div.flex.h-screen.flex-col > header.flex.h-14 {
  display: none !important;
}

html.ap-shell-embed aside.z-40.flex.shrink-0.flex-col {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

html.ap-shell-embed > body > div.flex.h-screen.flex-col {
  height: 100% !important;
}

html.ap-shell-embed > body > div.flex.h-screen.flex-col > div.flex.min-h-0.flex-1 {
  min-height: 0 !important;
  height: 100% !important;
}

html.ap-shell-embed main.flex.min-w-0.flex-1.flex-col {
  width: 100% !important;
  max-width: none !important;
  flex: 1 1 auto !important;
}

/* 联赛ID / 赛事ID 左缘对齐：勿只给直接子级 grid 加左右 padding（否则联赛ID比赛事ID偏右） */
div.space-y-3 > div.grid.items-center.gap-2,
div.space-y-3 > div.space-y-1 {
  padding: 0.75rem 0;
  box-sizing: border-box;
}

/* 联赛ID / 赛事ID：固定标签列 + * 占位宽，输入框左缘对齐 */
div.grid.grid-cols-\[112px_1fr\].items-center.gap-2 {
  grid-template-columns: 112px minmax(0, 1fr) !important;
  align-items: center;
}
div.grid.grid-cols-\[112px_1fr\].items-center.gap-2 > span.inline-flex.items-center {
  width: 112px;
  max-width: 112px;
  box-sizing: border-box;
}
div.grid.grid-cols-\[112px_1fr\].items-center.gap-2 > span.inline-flex.items-center > span.mr-1 {
  width: 8px !important;
  min-width: 8px !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
  text-align: center;
  box-sizing: border-box;
}

/* Keep required asterisk red/visible in both proto and PRD modes */
span.text-\[\#f56c6c\],
.grid.items-center.gap-2 > span > span:first-child {
  color: #f56c6c !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* PIC「上传图片」弹窗：补齐打包 CSS 未包含的任意值工具类 */
.w-\[420px\] {
  width: 420px;
}
.h-\[160px\] {
  height: 160px;
}
.h-\[36px\] {
  height: 36px;
}
.min-w-\[88px\] {
  min-width: 88px;
}
.pt-\[20px\] {
  padding-top: 20px;
}
.pb-\[28px\] {
  padding-bottom: 28px;
}
.px-\[48px\] {
  padding-left: 48px;
  padding-right: 48px;
}
.py-\[36px\] {
  padding-top: 36px;
  padding-bottom: 36px;
}
.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.gap-\[12px\] {
  gap: 12px;
}
.gap-\[16px\] {
  gap: 16px;
}
.right-\[16px\] {
  right: 16px;
}
.top-\[16px\] {
  top: 16px;
}
.text-\[44px\] {
  font-size: 44px;
}
.leading-\[24px\] {
  line-height: 24px;
}
.font-light {
  font-weight: 300;
}
.hover\:text-\[\#606266\]:hover {
  color: #606266;
}
.shadow-\[0_8px_28px_rgba\(0\,0\,0\,0\.18\)\] {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}


/* PIC 上传弹窗：固定视口居中（portal 到 body），不受父弹窗滚动/transform 影响；层级高于需求标记 */
/* Radix Dialog 会给 body 设 pointer-events:none，仅给 dialog-content 恢复 auto；
   PIC 遮罩同挂在 body 下会继承 none，导致 X/Cancel/点遮罩全部点不透——必须强制 auto */
[data-pic-upload-overlay] {
  position: fixed !important;
  inset: 0 !important;
  z-index: 200 !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  transform: none !important;
  pointer-events: auto !important;
}
[data-pic-upload-overlay] * {
  pointer-events: auto !important;
}

/* 编辑态已有联赛 ID：强制置灰不可编辑 */
[role="dialog"] input[data-locked="1"],
[role="dialog"] input:disabled {
  background-color: #f5f7fa !important;
  color: #909399 !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

/* 主弹窗与次级遮罩在 iframe 内保持高位 */
[data-slot="dialog-overlay"] {
  z-index: 50 !important;
}
[data-slot="dialog-content"] {
  z-index: 51 !important;
}
