/* 与飞同行 ERP 1.0
   仅覆盖视图呈现和账号管理视觉，不改变业务数据与存储逻辑。 */

/* 保持各工作区常驻布局，切换时只改变可见性，避免 display:none/block 引发整页重排。 */
body.erp-app .workspace,
body.erp-app .content{
  position:relative;
}
body.erp-app .content{isolation:isolate}
body.erp-app .view{
  display:block;
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  min-height:100%;
  visibility:hidden;
  opacity:0;
  pointer-events:none;
  z-index:0;
  animation:none!important;
  transition:none!important;
}
body.erp-app .view[hidden]{display:none!important}
body.erp-app .view.active{
  visibility:visible;
  opacity:1;
  pointer-events:auto;
  z-index:1;
  animation:none!important;
}

/* 降低长期运行时固定模糊层的合成压力。 */
body.erp-app .sidebar,
body.erp-app .user-popover,
body.erp-app .removal-command-bar,
body.erp-app .image-opt-command-bar,
body.erp-app .export-listing-header{
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
body.erp-app .sidebar{background:#fbfbfc!important}
body.erp-app .user-popover{background:#fff!important}
body.erp-app .removal-command-bar,
body.erp-app .image-opt-command-bar,
body.erp-app .export-listing-header{background:#f7f7f8!important}

/* 账号管理：顶端只保留一个新增按钮，下方直接展示四列账号详情。 */
body.erp-app .view-accounts{
  overflow:auto;
  background:#f7f7f8;
}
body.erp-app .accounts-page-minimal{
  min-height:100%;
  padding:42px clamp(22px,4vw,64px) 64px;
}
body.erp-app .accounts-shell-minimal{
  width:min(1080px,100%);
  margin:0 auto;
}
body.erp-app .accounts-primary-action{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:0 0 28px;
}
body.erp-app .account-add-button-minimal{
  min-width:126px;
  height:42px;
  padding:0 22px;
  border:0;
  border-radius:11px;
  color:#fff;
  background:#1d1d1f;
  box-shadow:none;
  font-size:13px;
  font-weight:650;
  letter-spacing:0;
  transform:none;
}
body.erp-app .account-add-button-minimal:hover{background:#000;box-shadow:none;transform:none}
body.erp-app .account-add-button-minimal:active{transform:none}
body.erp-app .accounts-feedback{
  min-height:20px;
  margin:-16px 0 10px;
  text-align:center;
  font-size:11px;
  line-height:20px;
}
body.erp-app .accounts-table-panel{
  overflow:visible;
  border:1px solid rgba(29,29,31,.08);
  border-radius:16px;
  background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.02);
}
body.erp-app .account-table{
  width:100%;
  overflow:visible;
}
body.erp-app .account-table-header,
body.erp-app .account-table-row{
  display:grid;
  grid-template-columns:minmax(150px,1.05fr) minmax(170px,1.25fr) minmax(130px,.8fr) 96px;
  align-items:center;
  column-gap:18px;
}
body.erp-app .account-table-header{
  min-height:46px;
  padding:0 22px;
  border-bottom:1px solid rgba(29,29,31,.07);
  color:#8a8a90;
  background:#fafafa;
  border-radius:16px 16px 0 0;
  font-size:11px;
  font-weight:620;
}
body.erp-app .account-table-body{
  display:block;
  overflow:visible;
}
body.erp-app .account-table-row{
  min-height:68px;
  padding:0 22px;
  border-bottom:1px solid rgba(29,29,31,.065);
  background:#fff;
}
body.erp-app .account-table-row:last-child{border-bottom:0;border-radius:0 0 16px 16px}
body.erp-app .account-table-row:hover{background:#fcfcfd}
body.erp-app .account-table-cell{
  min-width:0;
  overflow:hidden;
  color:#2f2f33;
  font-size:13px;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.erp-app .account-table-cell-name{font-weight:650;color:#1d1d1f}
body.erp-app .account-table-cell-account{color:#5f5f65}
body.erp-app .account-password-mask{
  display:inline-block;
  color:#717177;
  font-size:15px;
  letter-spacing:.12em;
  transform:translateY(-1px);
}
body.erp-app .account-table-cell-edit{
  overflow:visible;
  display:flex;
  justify-content:flex-end;
}
body.erp-app .account-menu-host{position:relative;overflow:visible}
body.erp-app .account-edit-button{
  min-width:58px;
  height:32px;
  padding:0 12px;
  border:1px solid rgba(29,29,31,.10);
  border-radius:9px;
  color:#45454a;
  background:#fff;
  font-size:11px;
  font-weight:620;
}
body.erp-app .account-edit-button:hover,
body.erp-app .account-edit-button[aria-expanded="true"]{
  border-color:rgba(29,29,31,.16);
  background:#f4f4f6;
}
body.erp-app .account-action-menu{
  z-index:6000;
  width:154px;
  padding:5px;
  border:1px solid rgba(29,29,31,.10);
  border-radius:12px;
  background:#fff;
  box-shadow:0 14px 38px rgba(0,0,0,.14);
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
  animation:none;
}
body.erp-app .account-action-menu button{
  height:36px;
  gap:8px;
  padding:0 10px;
  border:0;
  border-radius:8px;
  font-size:11px;
}
body.erp-app .account-action-menu button.danger{
  margin-top:2px;
  border-top:0;
  border-radius:8px;
}
body.erp-app .account-action-menu button:disabled{
  cursor:not-allowed;
  color:#b2b2b7;
  background:transparent;
}
body.erp-app .account-action-menu button:disabled:hover{color:#b2b2b7;background:transparent}
body.erp-app .account-list-empty{
  padding:42px 20px;
  color:#8e8e93;
  text-align:center;
  font-size:12px;
}

/* 弹窗保持紧凑；新增账号与修改密码仍沿用原保存、权限和持久化逻辑。 */
body.erp-app .account-editor-backdrop{
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  background:rgba(15,15,17,.32)!important;
}
body.erp-app .account-editor-modal{width:min(480px,calc(100vw - 32px));border-radius:16px;animation:none!important}
body.erp-app .account-editor-header{padding:19px 22px 13px}
body.erp-app .account-editor-header h2{font-size:20px}
body.erp-app .account-editor-body{padding:10px 22px 6px}
body.erp-app .account-editor-actions{padding:12px 22px 20px}

@media(max-width:760px){
  body.erp-app .accounts-page-minimal{padding:26px 12px 44px}
  body.erp-app .accounts-primary-action{margin-bottom:20px}
  body.erp-app .account-table-header{display:none}
  body.erp-app .accounts-table-panel{border-radius:14px}
  body.erp-app .account-table-row{
    grid-template-columns:1fr auto;
    grid-template-areas:
      "name edit"
      "account edit"
      "password edit";
    row-gap:5px;
    min-height:104px;
    padding:16px 16px;
  }
  body.erp-app .account-table-cell{white-space:normal}
  body.erp-app .account-table-cell-name{grid-area:name}
  body.erp-app .account-table-cell-account{grid-area:account;font-size:12px}
  body.erp-app .account-table-cell-password{grid-area:password}
  body.erp-app .account-table-cell-edit{grid-area:edit;align-self:center}
}
/* 页面本体不展示说明或状态小字；操作结果由列表变化和弹窗反馈体现。 */
body.erp-app #view-账号管理 .accounts-feedback{display:none!important}
