/* v4 分区样式：admin（在 style.css 之后加载，只写本区域选择器） */

/* ── 编辑人员：模块权限矩阵（弹窗只保留一层滚动） ── */
.permission-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.permission-fields legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.permission-fields .check-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-height: none;
  overflow: visible;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}
.permission-fields .perm-group {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px 6px;
}
.permission-fields .perm-group-title {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
}
.permission-fields .perm-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}
.permission-fields .check-list > div.perm-group {
  display: block;
}
.permission-fields .perm-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 5px 0;
  border-top: 1px solid var(--border);
}
.permission-fields .perm-rows > .perm-row:nth-child(-n + 2) {
  border-top: 0;
}
.permission-fields .perm-row label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
  min-width: 0;
}
.permission-fields .perm-row input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.permission-fields .perm-row select {
  width: 112px;
  max-width: 112px;
  height: 34px;
  min-height: 34px;
  padding: 0 28px 0 12px;
  line-height: 32px;
  font-size: 13px;
  border-radius: 9px;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}
.permission-fields .perm-row select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.permission-fields .perm-row label:has(input:disabled) {
  color: var(--text-tertiary);
  cursor: not-allowed;
}
.permission-fields .hint {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-tertiary);
}
@media (max-width: 680px) {
  .permission-fields .perm-rows {
    grid-template-columns: 1fr;
  }
  .permission-fields .perm-rows > .perm-row:nth-child(2) {
    border-top: 1px solid var(--border);
  }
  .permission-fields .perm-row {
    grid-template-columns: minmax(0, 1fr) 104px;
  }
  .permission-fields .perm-row select {
    width: 104px;
    max-width: 104px;
  }
}

/* ── 账号列表：访问模块摘要（手机端） ── */
#app[data-view='users'] .access-short {
  display: none;
}
#app[data-view='users'] .access-short > span:not(.access-more) + span:not(.access-more)::before {
  content: ' · ';
  color: var(--text-tertiary);
}
#app[data-view='users'] .access-more {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 20px;
  background: var(--surface-3);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 680px) {
  #app[data-view='users'] .access-full {
    display: none;
  }
  #app[data-view='users'] .access-short {
    display: inline;
  }
}

/* ── 存储与记录：键值清单 ── */
#app[data-view='storage'] .storage-card {
  display: grid;
  gap: 16px;
}
#app[data-view='storage'] .storage-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}
#app[data-view='storage'] .storage-lead strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 2px;
}
#app[data-view='storage'] .storage-kv {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
#app[data-view='storage'] .storage-kv > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
}
#app[data-view='storage'] .storage-kv > div:first-child {
  border-top: 0;
}
#app[data-view='storage'] .storage-kv dt {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
#app[data-view='storage'] .storage-kv dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
  min-width: 0;
  overflow-wrap: anywhere;
}
#app[data-view='storage'] .kv-mono {
  display: inline-block;
  max-width: 100%;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
#app[data-view='storage'] .kv-muted {
  color: var(--text-tertiary);
}
#app[data-view='storage'] .storage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}
#app[data-view='storage'] .storage-actions .text-link {
  margin-left: 4px;
}
@media (max-width: 680px) {
  #app[data-view='storage'] .storage-kv > div {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 10px 14px;
  }
  #app[data-view='storage'] .storage-kv dt {
    font-size: 12.5px;
  }
  #app[data-view='storage'] .storage-actions .btn {
    flex: 1 1 calc(50% - 4px);
  }
  #app[data-view='storage'] .storage-actions .text-link {
    flex: 1 1 100%;
    margin: 2px 0 0;
    text-align: center;
    justify-content: center;
  }
}

/* ── 回收站：顶部说明 ── */
#app[data-view='recycle'] .recycle-callout {
  margin-bottom: 18px;
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
#app[data-view='recycle'] .recycle-callout svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--accent);
  margin-top: 2px;
}
#app[data-view='recycle'] .recycle-callout strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}
#app[data-view='recycle'] .recycle-callout p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
}
