/* ============================================================================
 * V1.0.0 修复补丁 b18 样式
 *   一、全局表头固定（所有表格）
 *   二、授权台账
 *   三、管理员与权限
 *   四、到期提醒条
 * ========================================================================== */

/* ---------------------------------------------------------------------------
 * 一、全局表头固定
 *   表格被包进 .v106-tw（限高 + 可滚）后，thead 的 sticky 才有包含块可粘。
 *   限高由脚本按视口剩余空间实测写入，短表不产生滚动条。
 * ------------------------------------------------------------------------- */
.v106-tw {
  position: relative;
  overflow: auto;
  overscroll-behavior: contain;
  /* 圆角容器内滚动时不留白边 */
  border-radius: inherit;
}
.v106-tw > table { margin-bottom: 0; }
.v106-tw thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  /* 表头压住滚动内容时需要有底色，取各表自身的表头底色即可，
     这里兜一个，避免个别表没设背景时文字叠字 */
  background-image: linear-gradient(rgba(255, 255, 255, .72), rgba(255, 255, 255, .72));
  background-blend-mode: normal;
}
.v106-tw.v106-shadow thead th {
  box-shadow: 0 6px 10px -8px rgba(13, 43, 69, .45);
}
/* 打印 / 导出视图不需要限高滚动 */
@media print {
  .v106-tw { max-height: none !important; overflow: visible !important; }
}

/* ---------------------------------------------------------------------------
 * 二、授权台账
 * ------------------------------------------------------------------------- */
.v106-call {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; margin: 0 0 14px;
  border-radius: 8px; font-size: 13px; line-height: 1.7;
  background: #fff8e8; border: 1px solid #f2e2b8; color: #7a5a12;
}
.v106-call.warn { background: #fdf1ef; border-color: #f3d4cd; color: #8a3a2c; }
.v106-call .ic {
  flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px;
  border-radius: 50%; background: #e9b949; color: #fff;
  font-size: 12px; line-height: 18px; text-align: center; font-weight: 700;
}
.v106-call.warn .ic { background: #d1583f; }
.v106-call b { color: inherit; }

.v106-stats {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px;
}
.v106-stats > div {
  flex: 1 1 140px; min-width: 120px;
  background: #f7fafc; border: 1px solid #e8eef4; border-radius: 8px;
  padding: 10px 13px;
}
.v106-stats dt { font-size: 11.5px; color: #7b8b99; margin-bottom: 2px; }
.v106-stats dd { font-size: 20px; font-weight: 700; color: #17364d; line-height: 1.2; }
.v106-stats dd.w { color: #c2741a; }
.v106-stats dd.d { color: #b23636; }
.v106-stats dd.g { color: #0b8c7e; }

.v106-lt td { vertical-align: middle; }
.v106-lt .v105-op, .v106-at .v105-op { white-space: nowrap; }
.v106-lt .code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px; letter-spacing: .4px; color: #1c3f57;
  background: #f3f7fa; border: 1px solid #e5ecf2; border-radius: 4px;
  padding: 1px 6px; white-space: nowrap;
}
.v106-lt .sub { display: block; font-size: 11px; color: #93a3b1; margin-top: 2px; }
.v106-lt .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.v106-lt .days { font-variant-numeric: tabular-nums; font-weight: 600; }
.v106-lt .days.w { color: #c2741a; }
.v106-lt .days.d { color: #b23636; }

.v106-st {
  display: inline-block; font-size: 11px; line-height: 1.7; padding: 0 7px;
  border-radius: 4px; white-space: nowrap; border: 1px solid transparent;
}
.v106-st.active { color: #0b7d5e; background: #e8f7f4; border-color: #bfe9e1; }
.v106-st.expiring { color: #9a6414; background: #fdf6e7; border-color: #f0e0bd; }
.v106-st.frozen { color: #5c6b7a; background: #eef2f6; border-color: #dde5ec; }
.v106-st.revoked { color: #b23636; background: #fbeeec; border-color: #f0d6d1; }

/* ---------------------------------------------------------------------------
 * 三、管理员与权限
 * ------------------------------------------------------------------------- */
.v106-at td { vertical-align: middle; }
.v106-at .who { font-weight: 600; color: #17364d; }
.v106-at .mods { display: flex; flex-wrap: wrap; gap: 4px; }
.v106-at .mods span {
  font-size: 11px; color: #43617a; background: #f1f5f9;
  border: 1px solid #e3eaf1; border-radius: 4px; padding: 0 6px; line-height: 1.7;
}
.v106-at .mods span.off { color: #a5b2be; background: #fff; border-style: dashed; }

.v106-perm-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin: 10px 0 4px; }
.v106-perm-list label {
  /* 用 grid 而不是 flex：flex 下文本列在窄容器里会被压成 0 宽（字全竖排），
     grid 的 1fr 有确定的最小尺寸，不会塌。 */
  display: grid; grid-template-columns: 18px minmax(0, 1fr);
  align-items: start; gap: 8px;
  padding: 8px 10px; border: 1px solid #e8eef4; border-radius: 7px;
  background: #fafcfd; cursor: pointer; font-size: 13px; line-height: 1.5;
}
.v106-perm-list label:hover { border-color: #cfe3ea; background: #f6fbfc; }
.v106-perm-list label.on { border-color: #bfe9e1; background: #eefaf7; }
.v106-perm-list input { margin: 3px 0 0; justify-self: start; width: 14px; height: 14px; }
.v106-perm-list .t { display: block; font-weight: 600; color: #23425a; }
.v106-perm-list .d { display: block; font-size: 11.5px; color: #8b9aa7; font-weight: 400; }
.v106-perm-lock {
  margin-top: 10px; font-size: 12px; color: #8b9aa7; line-height: 1.7;
  background: #f7fafc; border: 1px dashed #dde6ee; border-radius: 7px; padding: 8px 11px;
}

/* ---------------------------------------------------------------------------
 * 四、到期提醒条（平台首页顶部）
 * ------------------------------------------------------------------------- */
.v106-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 15px; margin: 0 0 14px;
  border-radius: 9px;
  background: linear-gradient(90deg, #fff7e6, #fffdf8);
  border: 1px solid #f0e0bd;
  box-shadow: 0 2px 8px rgba(176, 137, 40, .06);
}
.v106-banner .ico {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: #f6e3b4; color: #8a5a00;
  display: flex; align-items: center; justify-content: center;
}
.v106-banner .tx { flex: 1 1 auto; font-size: 13px; color: #6f5210; line-height: 1.6; }
.v106-banner .tx b { color: #8a5a00; }
.v106-banner .tx i { font-style: normal; color: #9c7a35; font-size: 12px; }
.v106-banner a.btn-o {
  flex: 0 0 auto; font-size: 12.5px; padding: 5px 12px;
  border: 1px solid #d9c493; background: #fff; color: #8a5a00;
  border-radius: 6px; text-decoration: none; white-space: nowrap;
}
.v106-banner a.btn-o:hover { background: #fffaf0; }

@media (max-width: 900px) {
  .v106-perm-list { grid-template-columns: 1fr; }
  .v106-banner { flex-wrap: wrap; }
}
