/* 管理后台样式（桌面版，复用 ../assets/style.css 的变量与基础件） */

body{background:#f5f6f8}

.adm{max-width:1180px;margin:0 auto;padding:24px 24px 48px}

/* ---------- 登录 ---------- */
.login-view{
  min-height:calc(100vh - 72px);display:flex;align-items:center;justify-content:center;
}
.login-box{
  width:100%;max-width:360px;text-align:center;background:#fff;border:1px solid var(--line);
  border-radius:16px;padding:32px 26px;box-shadow:0 10px 30px -18px rgba(17,24,39,.25);
}
.login-box h1{font-size:19px;font-weight:800;margin-bottom:8px}
.login-sub{font-size:13px;color:var(--text-2);margin-bottom:22px}
.login-box input{
  width:100%;height:44px;padding:0 14px;margin-bottom:14px;
  border:1.5px solid var(--line);border-radius:10px;background:var(--bg-2);
  font-size:15px;outline:none;
}
.login-box input:focus{border-color:var(--blue);background:#fff;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.login-tip{margin-top:14px;font-size:11.5px;color:var(--text-3)}

/* ---------- 头部工具条 ---------- */
.adm-head{
  display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
  background:#fff;border:1px solid var(--line);border-radius:12px;
  padding:14px 18px;margin-bottom:14px;
}
.head-left{display:flex;align-items:baseline;gap:12px;flex:0 0 auto}
.head-left h1{font-size:18px;font-weight:800;letter-spacing:.3px}
.head-stat{font-size:12.5px;color:var(--text-2)}
.head-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}

.search-box{display:flex;gap:8px}
.search-box input{
  width:200px;height:36px;padding:0 12px;border:1.5px solid var(--line);
  border-radius:8px;background:var(--bg-2);font-size:13.5px;outline:none;
}.search-box input:focus{border-color:var(--blue);background:#fff}

.btn-mini{
  height:36px;padding:0 14px;border-radius:8px;border:1.5px solid var(--line);
  background:#fff;font-size:13.5px;font-weight:600;color:var(--text);cursor:pointer;flex:0 0 auto;
}
.btn-mini:hover{border-color:#cbd5e1;background:#fafbfc}
.btn-mini:active{background:var(--bg-2)}
.btn-mini:disabled{opacity:.45;cursor:default}
.btn-ghost-danger{color:#dc2626;border-color:#fecaca;background:#fff}
.btn-ghost-danger:hover{background:#fef2f2;border-color:#fca5a5}

/* 勾选相关 */
.dl-filter{
  display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;
  height:36px;padding:0 12px;border-radius:8px;border:1.5px solid var(--line);
  background:#fff;font-size:13px;font-weight:600;color:var(--text-2);
  cursor:pointer;user-select:none;white-space:nowrap;
}
.dl-filter:has(input:checked){border-color:var(--blue);color:var(--blue);background:#f4f8ff}
.dl-filter input{width:14px;height:14px;margin:0;accent-color:var(--blue);cursor:pointer}
.sel-info{font-size:12.5px;font-weight:700;color:var(--blue);white-space:nowrap;flex:0 0 auto}
.btn-clear{color:var(--text-2);padding:0 10px}
.btn-primary-mini{background:var(--blue);border-color:var(--blue);color:#fff}
.btn-primary-mini:hover{background:#1d4fd8;border-color:#1d4fd8;color:#fff}
.btn-primary-mini:disabled{background:#bfd3f8;border-color:#bfd3f8;color:#fff;opacity:1}
.btn-ghost-danger:disabled{opacity:.5}

/* 勾选后出现的操作条 */
.sel-bar{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:10px 16px;margin-bottom:12px;
  background:#f4f8ff;border:1.5px solid #cfe0fb;border-radius:10px;
}
.sel-bar[hidden]{display:none}
.sel-bar-text{font-size:13px;color:var(--text-2);flex:0 0 auto}
.sel-bar-text b{color:var(--blue);font-size:14px;margin:0 2px}
.sel-bar-hint{font-size:12px;color:var(--text-3);margin-left:auto}

.link-btn{
  background:none;border:none;color:var(--text-2);font-size:13px;font-weight:600;
  padding:6px 2px;cursor:pointer;
}
.link-btn:hover{color:var(--text)}

/* ---------- 表格 ---------- */
.table-card{
  background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden;
}
.table-wrap{overflow-x:auto}
.tbl{width:100%;border-collapse:collapse;font-size:13.5px;min-width:900px}
.tbl th{
  text-align:left;font-weight:700;font-size:12.5px;color:var(--text-2);
  background:#f9fafb;padding:12px 14px;border-bottom:1px solid var(--line);white-space:nowrap;
}
.tbl td{
  padding:10px 14px;border-bottom:1px solid #f1f3f5;vertical-align:middle;color:var(--text);
}
.tbl tbody tr:last-child td{border-bottom:none}
.tbl tbody tr:hover{background:#fafbfc}
.col-sel{width:40px}
.col-pic{width:76px}
.col-code{width:132px}
.col-name{width:110px}
.col-dept{width:118px}
.col-org{width:150px}
.col-dl{width:112px}
.col-time{width:160px}

/* 勾选列与下载状态 */
.tbl th.col-sel{padding-right:0}
.tbl td.col-sel{padding-right:0}
.tbl input[type=checkbox]{
  width:15px;height:15px;margin:0;cursor:pointer;
  accent-color:var(--blue);vertical-align:-2px;
}
.tbl input[type=checkbox]:disabled{cursor:not-allowed;opacity:.4}
.tbl tbody tr.is-sel{background:#f4f8ff}
.tbl tbody tr.is-sel:hover{background:#eef4ff}
.dl-tag{
  display:inline-block;font-size:11.5px;font-weight:700;color:#0f7a4d;
  background:#e8f8f0;padding:2px 7px;border-radius:5px;white-space:nowrap;
}
.dl-none{font-size:12px;color:var(--text-3);white-space:nowrap}

.tbl .code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:13px;color:var(--text-2)}
.tbl .name{font-weight:700}
.tbl .org{color:var(--text-2)}
.tbl .time{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12.5px;color:var(--text-3);white-space:nowrap}
.badge{
  display:inline-block;font-size:11px;font-weight:700;color:var(--blue);
  background:#eef4ff;padding:2px 7px;border-radius:5px;
}

.thumb{
  width:48px;height:51px;border-radius:5px;overflow:hidden;background:var(--bg-2);
  cursor:zoom-in;display:flex;align-items:center;justify-content:center;
}
.thumb img{width:100%;height:100%;object-fit:cover;display:block}
.thumb.cleared{cursor:default;background:#f3f4f6;border:1px dashed #e2e5ea}
.thumb.cleared span{font-size:10.5px;color:var(--text-3)}

/* ---------- 分页 ---------- */
.pager{display:flex;align-items:center;justify-content:center;gap:14px;padding:18px 0 0}
.pager span{font-size:13px;color:var(--text-2);font-weight:600}

/* ---------- 空态 ---------- */
.empty{text-align:center;padding:64px 20px;color:var(--text-3);font-size:13.5px}
.empty b{display:block;font-size:15px;color:var(--text-2);margin-bottom:8px}

/* ---------- 大图 ---------- */
.lightbox{
  position:fixed;inset:0;background:rgba(6,10,16,.9);z-index:100;
  display:none;flex-direction:column;align-items:center;justify-content:center;padding:20px;
}
.lightbox.show{display:flex}
.lightbox img{max-width:100%;max-height:78vh;border-radius:8px;object-fit:contain;background:#fff}
.lb-bar{display:flex;gap:12px;margin-top:18px}
.lb-bar .btn-mini{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.25);color:#fff;text-decoration:none;display:inline-flex;align-items:center}

/* ---------- 确认弹层 ---------- */
.modal{
  position:fixed;inset:0;background:rgba(6,10,16,.5);z-index:120;
  display:none;align-items:center;justify-content:center;padding:20px;
}
.modal.show{display:flex}
.modal-box{
  width:100%;max-width:380px;background:#fff;border-radius:16px;padding:22px 20px 18px;
  box-shadow:0 20px 50px rgba(0,0,0,.22);
}
.modal-box h3{font-size:16.5px;font-weight:800;margin-bottom:8px}
.modal-lead{font-size:13px;color:var(--text-2);line-height:1.55;margin-bottom:12px}
.modal-facts{
  list-style:none;font-size:13px;line-height:1.9;color:var(--text-2);
  background:var(--bg-2);border-radius:10px;padding:10px 12px;margin-bottom:12px;
}
.modal-facts b{color:var(--text)}
.modal-facts b.safe{color:#059669}
.modal-warn{
  font-size:12px;color:#b91c1c;background:#fef2f2;border-radius:8px;padding:8px 10px;line-height:1.6;
}
.modal-warn b{font-weight:800}
.modal-actions{display:flex;gap:10px;margin-top:16px}
.modal-actions .btn-mini{flex:1}
.btn-danger{background:#dc2626;border-color:#dc2626;color:#fff}
.btn-danger:hover{background:#b91c1c;border-color:#b91c1c;color:#fff}
.btn-danger:disabled{opacity:.55}

/* ---------- 登录表单（多账号） ---------- */
.login-form{display:block}
.login-form[hidden]{display:none}

/* ---------- 右上角用户菜单 ---------- */
.user-menu{position:relative}
.user-btn{
  display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 11px 0 4px;
  border:1px solid var(--line);border-radius:999px;background:#fff;cursor:pointer;
  font-size:12.5px;color:var(--text);font-family:inherit;
}
.user-btn:hover{border-color:#cbd5e1;background:#fafbfc}
.user-avatar{
  width:24px;height:24px;border-radius:50%;background:var(--blue);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;
  flex:0 0 auto;
}
.user-label{max-width:96px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-pop{
  position:absolute;right:0;top:calc(100% + 6px);min-width:132px;background:#fff;
  border:1px solid var(--line);border-radius:10px;padding:5px;z-index:60;
  box-shadow:0 12px 30px -12px rgba(17,24,39,.3);
}
.pop-item{
  display:block;width:100%;text-align:left;padding:9px 10px;border:0;border-radius:7px;
  background:transparent;font-size:13px;color:var(--text);cursor:pointer;font-family:inherit;
}
.pop-item:hover{background:var(--bg-2)}
.pop-danger{color:#dc2626}

/* ---------- 弹窗表单字段 ---------- */
.field{margin-bottom:12px;text-align:left}
.field label{display:block;font-size:12px;color:var(--text-2);margin-bottom:6px;font-weight:600}
.field input,.field select{
  width:100%;height:40px;padding:0 12px;border:1.5px solid var(--line);border-radius:9px;
  background:var(--bg-2);font-size:14px;outline:none;font-family:inherit;color:var(--text);
}
.field input:focus,.field select:focus{
  border-color:var(--blue);background:#fff;box-shadow:0 0 0 3px rgba(37,99,235,.1);
}
.field input:disabled{background:#f1f5f9;color:var(--text-3)}
.field-tip{font-size:11.5px;color:var(--text-3);text-align:left;margin:-4px 0 0}

.modal-wide{max-width:720px}
.modal-top{z-index:140} /* 叠在用户列表弹窗之上 */

.btn-mini.primary{background:var(--blue);border-color:var(--blue);color:#fff}
.btn-mini.primary:hover{background:var(--blue-dark);border-color:var(--blue-dark);color:#fff}
.btn-mini.primary:disabled{opacity:.55}

/* ---------- 用户列表 ---------- */
.users-bar{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.users-hint{font-size:12px;color:var(--text-3)}
.users-tbl td{font-size:13px}
.users-tbl .col-act{white-space:nowrap}
.users-tbl .col-act .btn-mini{margin-right:6px;padding:4px 10px;font-size:12px}
.users-tbl .col-act .btn-mini:last-child{margin-right:0}
.row-off td{opacity:.55}
.tag{
  display:inline-block;padding:2px 8px;border-radius:999px;background:var(--bg-2);
  border:1px solid var(--line);font-size:11.5px;color:var(--text-2);
}
.tag-super{background:#eef4ff;border-color:#d6e4ff;color:#1d4ed8}

/* ---------- 窄屏降级（手机上也能操作） ---------- */
@media (max-width:900px){
  .adm{padding:14px 12px 32px}
  .adm-head{padding:12px 14px;gap:10px}
  .head-right{width:100%;justify-content:flex-start}
  .search-box{flex:1 1 100%}
  .search-box input{flex:1;width:auto}
  .login-view{min-height:calc(100vh - 46px)}
}
