/* ==========================================================================
   后台 UI 重构层（ui-refresh.css）
   --------------------------------------------------------------------------
   为什么单独一层而不是改原文件：
   styles.css / admin-extra.css / console-v2.css 三个文件里已经有 10 个不同的
   断点值（390 / 430 / 660 / 760 / 900 / 980 / 1100 / 1180 / 1250 / max-height:760），
   互相叠加、顺序敏感。直接改任何一处都可能让别的页面塌掉。
   这一层只在最后加载，统一接管「外壳布局 + 导航 + 响应式」，把断点收敛为三档：

     手机   ≤ 640px
     平板   ≤ 1024px
     桌面   > 1024px

   原有页面级样式（卡片、表格、图表）保持不变，避免大范围回归风险。
   ========================================================================== */

:root {
  /* 断点只在这三个值上，样式里不要再出现别的数字 */
  --bp-phone: 640px;
  --bp-tablet: 1024px;

  --shell-sidebar: 232px;
  --mobile-tabbar-h: 58px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* 覆盖 console-v2 的紧凑值：截图上 9~10px 字号在 1440 屏上偏小 */
  --fs-kicker: 11px;
  --fs-body: 13px;
  --fs-muted: 12px;
}

/* ---------------------------------------------------------------- 基础排版 */

body { font-size: var(--fs-body); -webkit-text-size-adjust: 100%; }

/* 导航图标统一线条风格，避免每个按钮单独写路径样式 */
.app-shell > aside nav button svg,
#mobileTabs button svg,
.mobile-sheet-grid button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------ 桌面侧边栏 */

.app-shell { grid-template-columns: var(--shell-sidebar) minmax(0, 1fr); }

.app-shell > aside {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-self: start;
  height: 100vh;
  padding: 18px 12px 14px;
}

/* 品牌区：收紧，给导航留出更多纵向空间 */
.side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; }
.side-brand b { width: 34px; height: 34px; font-size: 15px; }
.side-brand strong { display: block; font-size: 13px; line-height: 1.3; }
.side-brand small { display: block; margin-top: 1px; font-size: 10px; }

.app-shell > aside nav { display: grid; flex: 1 1 auto; align-content: start; gap: 2px; margin-top: 4px; }

/*
 * 导航项：图标 + 文案水平排列。
 * 原实现用 ::before 塞单字母并靠 padding-left 让位，加新页面极易错位；
 * 现在图标是真实 DOM，间距由 flex gap 决定。
 */
.app-shell > aside nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  color: #aebbb7;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
}
.app-shell > aside nav button::before { content: none; }  /* 干掉旧的字母图标 */
.app-shell > aside nav button svg { color: #7d8d88; transition: color 160ms ease; }
.app-shell > aside nav button:hover { color: #fff; background: var(--ui-sidebar-hover); }
.app-shell > aside nav button:hover svg { color: #b9cbc5; }
.app-shell > aside nav button.active { color: #fff; background: #2a3935; box-shadow: inset 3px 0 0 #56b79f; }
.app-shell > aside nav button.active svg { color: #7fd8c1; }

.side-user { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 12px 8px 0; border-top: 1px solid #35423e; }
.side-user span { flex: 1 1 auto; overflow: hidden; color: #d6dfdc; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.side-user button { padding: 5px 10px; border: 1px solid #4a3a3d; border-radius: 6px; background: transparent; font-size: 11.5px; }

/* -------------------------------------------------------------- 主内容区 */

.workspace { max-width: 1480px; padding: 28px 32px 56px; }

.workspace > header {
  display: flex;
  align-items: flex-end;
  /* 必须显式写 flex-start：styles.css 里有 header{justify-content:space-between}，
     竖排（column）时它会把按钮推到容器底部，撑出几百像素的空白。 */
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
/*
 * 不要写 flex:1 1 320px。
 * flex-basis 在 column 方向上表示「高度」：竖排时它会把标题区强行撑到 320px 高，
 * 于是在标题与按钮之间出现几百像素空白。宽度由 width:100% 主张，伸缩交给行方向。
 */
.workspace > header > div { flex: 1 1 auto; width: 100%; min-width: 0; }
.workspace > header h1 { font-size: 24px; line-height: 1.25; }
.workspace > header p { max-width: 720px; margin-top: 6px; color: var(--ui-muted); font-size: var(--fs-muted); line-height: 1.6; }
.workspace > header > button { flex: 0 0 auto; }

/* --------------------------------------------------------------- 统计卡片 */
/*
 * 原来每张卡 min-height:104px、大数字在上标签在下，一张卡占掉将近一个手机屏高。
 * 改成「图标 + 数字 + 标签」单行紧凑排布：桌面一屏能看到 4 张，手机 2×2 也不挤。
 */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 16px; }
.summary-grid article {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
}
.summary-grid article > strong,
.summary-grid article > span:first-child { flex: 0 0 auto; }
.summary-grid article strong { font-size: 22px; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.summary-grid article span { color: var(--ui-muted); font-size: 11.5px; line-height: 1.4; }

/* 授权码页的统计卡自带图标块与两行结构，单独对齐 */
.license-metric { align-items: center; }
.license-metric > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.license-metric > div > span { color: var(--ui-muted); font-size: 11.5px; }
.license-metric > div > strong { font-size: 20px; }
.license-metric > div > small { color: #9aa5a0; font-size: 10.5px; }

/* ------------------------------------------------------------------ 面板 */

.panel { border-radius: var(--radius-md); }
.panel-title { min-height: 0; padding: 15px 18px; gap: 12px; flex-wrap: wrap; }
.panel-title h2 { font-size: 14.5px; }
.panel-title p { font-size: 11.5px; }

/* 空态：不再固定大高度，居中即可 */
.empty, .release-list .empty { padding: 34px 18px; color: #98a3a0; font-size: 12px; text-align: center; }

/* 趋势图区域给一个合理的最小高度，但不撑满整屏 */
.analytics-trend-panel,
.analytics-snapshot-panel { min-height: 0; }
.analytics-trends, .analytics-recent { min-height: 200px; }

/* ============================================================ 移动端底部栏
   只在 ≤1024px 显示。桌面端整块不渲染（display:none），不占空间也不参与 tab 顺序。
   ========================================================================== */

/* 用 #mobileTabs 而不是 .mobile-tabs：
   styles.css 里 `.app-shell nav{display:grid;gap:7px}` 特异度是 (0,1,1)，
   而 #mobileTabs 本身就是一个 .app-shell 下的 <nav>，会被它命中改成 grid 竖排。
   id 选择器 (1,0,0) 才能稳定压过它。 */
#mobileTabs { display: none; }

#mobileTabs button {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 46px;
  padding: 4px 2px;
  border: 0;
  border-radius: var(--radius-sm);
  color: #8d9a96;
  background: transparent;
  font-size: 10.5px;
  font-weight: 600;
}
#mobileTabs button svg { width: 20px; height: 20px; }
#mobileTabs button.active { color: #7fd8c1; }
#mobileTabs button:active { background: rgba(255, 255, 255, .06); }

/* 「更多」面板 */
.mobile-sheet { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; background: rgba(12, 18, 16, .5); }
.mobile-sheet-panel {
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  background: var(--ui-surface);
  box-shadow: 0 -10px 30px rgba(12, 18, 16, .22);
}
.mobile-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mobile-sheet-head strong { font-size: 15px; }
.mobile-sheet-head button { width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--ui-muted); background: var(--ui-surface-soft); font-size: 20px; line-height: 1; }

.mobile-sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mobile-sheet-grid button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 6px;
  border: 1px solid var(--ui-line);
  border-radius: var(--radius-md);
  color: #3d4a46;
  background: var(--ui-surface-soft);
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
}
.mobile-sheet-grid button svg { width: 22px; height: 22px; color: var(--ui-accent); }
.mobile-sheet-grid button:active { background: var(--ui-accent-soft); }

.mobile-sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ui-line); }
.mobile-sheet-foot span { overflow: hidden; color: var(--ui-muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-logout { padding: 8px 14px; border: 1px solid #e3c9cc; border-radius: var(--radius-sm); color: var(--ui-danger); background: #fff; font-size: 12px; font-weight: 600; }

/* 面板打开时锁住背景滚动，避免滑动穿透 */
body.sheet-open { overflow: hidden; }

/* ============================================================== 合规策略页
   桌面左右双栏：左「变更说明 + 黑名单」，右「提示词（标签切换）」。
   移动端单栏 + 标签切换。
   ========================================================================== */

.policy-panel { overflow: visible; }

.policy-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 16px 18px; align-items: stretch; }
.policy-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.policy-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.policy-field-grow { flex: 1 1 auto; }
.policy-label { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; color: #46534f; font-size: 12px; font-weight: 700; }
.policy-label small { color: #98a3a0; font-size: 10.5px; font-weight: 500; }
.policy-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 99px;
  color: var(--ui-accent);
  background: var(--ui-accent-soft);
  font-size: 10.5px;
  font-weight: 800;
}

.policy-field input,
.policy-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--radius-sm);
  color: var(--ui-text);
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.65;
}
.policy-field textarea { min-height: 260px; resize: vertical; font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; }
.policy-field input:focus, .policy-field textarea:focus { border-color: var(--ui-accent); outline: none; box-shadow: 0 0 0 3px rgba(22, 115, 95, .12); }

.policy-tabs { display: flex; gap: 6px; padding: 3px; border: 1px solid var(--ui-line); border-radius: var(--radius-sm); background: var(--ui-surface-soft); }
.policy-tabs button { flex: 1 1 0; padding: 8px 10px; border: 0; border-radius: 6px; color: var(--ui-muted); background: transparent; font-size: 12px; font-weight: 600; }
.policy-tabs button.active { color: var(--ui-accent); background: #fff; box-shadow: 0 1px 3px rgba(24, 32, 30, .1); }

/* 吸底操作条：桌面跟着面板内容走，移动端固定吸底 */
.policy-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--ui-line);
  background: var(--ui-surface-soft);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.policy-dirty { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; color: var(--ui-amber); font-size: 11.5px; font-weight: 600; }
.policy-dirty::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }

/* ============================================================== 响应式：平板 */

@media (max-width: 1024px) {
  /* 侧栏收起，改用底部标签栏 */
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .app-shell > aside { display: none; }

  .workspace {
    max-width: none;
    padding: 20px 18px calc(var(--mobile-tabbar-h) + 28px + env(safe-area-inset-bottom));
  }
  .workspace > header { align-items: flex-start; margin-bottom: 16px; }
  .workspace > header h1 { font-size: 21px; }

  #mobileTabs {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid #2c3a36;
    background: var(--ui-sidebar);
    box-shadow: 0 -4px 18px rgba(12, 18, 16, .18);
  }

  /* 双栏塌成单栏 */
  .policy-editor { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 14px; }
  .policy-field textarea { min-height: 200px; }

  /* 移动端把发布按钮固定吸底，滚到页面中部也能直接发 */
  .policy-footer {
    position: sticky;
    bottom: calc(var(--mobile-tabbar-h) + env(safe-area-inset-bottom));
    z-index: 20;
    padding: 10px 14px;
    border-radius: 0;
  }

  /* 统计卡片两列 */
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .summary-grid article { padding: 12px 13px; }
  .summary-grid article strong { font-size: 19px; }

  /* 分析页原本是左右两栏，窄屏必须塌成一栏 */
  .analytics-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .analytics-trends, .analytics-recent { min-height: 160px; }

  /* 表单在窄屏一律单列，避免半宽输入框装不下中文占位符 */
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .wide { grid-column: auto; }

  /* 公告编辑器的「表单 + 预览」双栏在窄屏塌成上下 */
  .announcement-editor-layout { grid-template-columns: minmax(0, 1fr); }
  .announcement-preview { display: none; }

  /* 授权/设备页的工具条：搜索框独占一行，按钮并排 */
  .license-panel-title, .operations-list-title { flex-direction: column; align-items: stretch; }
  .license-toolbar, .operations-toolbar { flex-wrap: wrap; gap: 8px; }
  .license-search-field { flex: 1 1 100%; }
  .license-toolbar > button, .operations-toolbar > button { flex: 1 1 calc(50% - 4px); }
}

/* ============================================================== 响应式：手机 */

@media (max-width: 640px) {
  .workspace { padding: 16px 12px calc(var(--mobile-tabbar-h) + 22px + env(safe-area-inset-bottom)); }
  .workspace > header { flex-direction: column; align-items: stretch; gap: 10px; }
  .workspace > header h1 { font-size: 19px; }
  .workspace > header p { font-size: 11.5px; }
  /* 主操作按钮整行铺满，拇指更容易点到 */
  .workspace > header > button { width: 100%; min-height: 42px; }

  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-grid article { padding: 11px 12px; gap: 8px; }
  .summary-grid article strong { font-size: 18px; }
  .summary-grid article span { font-size: 10.5px; }

  .panel-title { padding: 13px 14px; }
  .panel-title h2 { font-size: 14px; }

  /* 表格类内容允许横向滚动，但容器要有可见滚动条提示 */
  .analytics-table-wrap, .release-list, .license-list { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* 标签页在手机上本身就要能滑，不能换行挤成两行 */
  .analytics-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .analytics-tabs::-webkit-scrollbar { display: none; }
  .analytics-tabs button { flex: 0 0 auto; white-space: nowrap; }

  .policy-field textarea { min-height: 180px; font-size: 12px; }
  .policy-tabs { position: sticky; top: 0; z-index: 10; }

  /* 移动端面板几乎全屏，圆角收小更省空间 */
  dialog { width: calc(100vw - 16px); max-width: none; max-height: calc(100vh - 16px); margin: 8px; }
  .dialog-head { padding: 14px 16px; }
  .dialog-actions { flex-wrap: wrap; }
  .dialog-actions button { flex: 1 1 auto; min-height: 42px; }

  .mobile-sheet-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .mobile-sheet-grid button { padding: 12px 4px; font-size: 11px; }
}

/*
 * 极窄屏（≤380px）：数字与标签改为上下排，但仍是 2 列。
 *
 * 用 #analyticsSummary / #licenseSummary 这类 id 选择器，是因为 console-v2.css 里有
 * `#analyticsSummary { grid-template-columns: 1fr }`（≤430px），id 优先级高于
 * .summary-grid 的 class，不这样写压不住 —— 那样 390px 上会变成每张卡独占一行，
 * 4 张卡就要滚两屏。
 */
@media (max-width: 430px) {
  #analyticsSummary.analytics-summary,
  #analyticsSummary,
  #licenseSummary,
  #operationsSummary,
  #summary,
  #announcementSummary { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

  /* 2 列时空间很紧：文字横排会换行挤成两行，改成上下排更稳 */
  .summary-grid article { flex-direction: column; align-items: flex-start; gap: 2px; }
  .summary-grid article strong { font-size: 17px; }
  .summary-grid article span { font-size: 10px; }
}

/* ================================================================ 无障碍 */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* 触摸设备上不要保留 hover 残留态，否则点完一直亮着 */
@media (hover: none) {
  .app-shell > aside nav button:hover { color: #aebbb7; background: transparent; }
  .release-row:hover { transform: none; box-shadow: none; }
}

/* ============================================================ 推送对象选择
   发布向导第一步与「调整推送范围」对话框共用这套结构。
   ========================================================================== */

.target-section { padding: 0 26px 4px; }
.target-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; }
.target-head strong { color: #46534f; font-size: 12px; font-weight: 700; }
.target-head small { color: #98a3a0; font-size: 10.5px; }

.target-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.target-mode {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.target-mode input { flex: 0 0 auto; width: auto; margin-top: 2px; accent-color: var(--ui-accent); }
.target-mode span { display: grid; gap: 2px; min-width: 0; }
.target-mode b { color: #3d4a46; font-size: 12px; font-weight: 700; }
.target-mode small { color: #98a3a0; font-size: 10.5px; line-height: 1.4; }
.target-mode:has(input:checked) { border-color: var(--ui-accent); background: var(--ui-accent-soft); }
.target-mode:has(input:checked) b { color: var(--ui-accent); }

.target-picker {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--radius-sm);
  background: var(--ui-surface-soft);
}
.target-picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.target-picker-head > span { color: #6b7873; font-size: 11px; font-weight: 600; }
.target-refresh { padding: 4px 9px; border: 1px solid var(--ui-line); border-radius: 6px; color: var(--ui-muted); background: #fff; font-size: 10.5px; }

.target-group-list { display: grid; gap: 10px; max-height: 240px; overflow-y: auto; }
.target-group-title { color: #98a3a0; font-size: 10px; font-weight: 700; letter-spacing: .04em; margin-bottom: 4px; }
.target-group-block + .target-group-block { border-top: 1px dashed var(--ui-line); padding-top: 9px; }
.target-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 9px;
  margin-bottom: 4px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.target-group:hover { border-color: var(--ui-line); }
.target-group input { flex: 0 0 auto; width: auto; margin-top: 2px; accent-color: var(--ui-accent); }
.target-group span { display: grid; gap: 1px; min-width: 0; }
.target-group b { color: #3d4a46; font-size: 11.5px; font-weight: 600; word-break: break-all; }
.target-group small { color: #98a3a0; font-size: 10px; }
.target-group:has(input:checked) { border-color: var(--ui-accent); background: var(--ui-accent-soft); }
/* 0 台设备的分组标灰：勾了也收不到人，提示先激活 */
.target-group.is-idle b { color: #9aa5a0; }

.target-empty { padding: 18px 12px; color: #98a3a0; font-size: 11.5px; text-align: center; }
.target-summary { display: block; margin-top: 9px; color: #6b7873; font-size: 10.5px; line-height: 1.5; }

/* 列表里的推送范围标签 */
.tag.target-include { color: #1a6b8a; background: #e3f2f8; }
.tag.target-exclude { color: #8a5a1a; background: #fbf0dd; }

/* 调整范围对话框 */
.target-dialog-body { display: flex; flex-direction: column; }
.target-dialog-inner { padding: 18px 26px; display: grid; gap: 12px; }
.target-dialog-note { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); color: #6b5a3d; background: #fff9eb; font-size: 11.5px; line-height: 1.6; }
#targetDialog { width: min(760px, calc(100vw - 40px)); }

@media (max-width: 1024px) {
  .target-modes { grid-template-columns: minmax(0, 1fr); }
  .target-section { padding: 0 16px 4px; }
  .target-dialog-inner { padding: 14px 16px; }
  #targetDialog { width: calc(100vw - 16px); }
}

/* 发布向导的步骤条在窄屏会被挤出容器：允许横向滚动而不是被裁掉 */
@media (max-width: 640px) {
  .wizard-steps { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; }
  .wizard-steps::-webkit-scrollbar { display: none; }
  .wizard-steps span { flex: 0 0 auto; }
  /* 对话框内边距收紧，把宽度让给内容 */
  #releaseDialog .form-grid { padding: 16px; }
  #releaseDialog .target-section { padding: 0 16px 4px; }
}

/* ============================================================== 编辑版本对话框
   一次性容纳标题、更新内容、强制/可选与推送对象。
   ========================================================================== */

#editReleaseDialog { width: min(820px, calc(100vw - 40px)); }
#editReleaseForm { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.edit-release-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 26px 18px; }
.edit-release-body .form-grid { padding: 0; }
.edit-release-body .target-dialog-note { margin: 0 0 14px; }
.edit-release-body .target-section { padding: 0; margin-top: 6px; }

/* 强制更新二次确认：改成强制时才出现，用醒目色块 */
#editMandatoryWarn { margin: 0 0 14px; }

@media (max-width: 640px) {
  #editReleaseDialog { width: calc(100vw - 16px); }
  #editReleaseForm { max-height: calc(100vh - 16px); }
  .edit-release-body { padding: 4px 16px 16px; }
}
