/* ============================================================
   通用弹窗样式
   设计目标：比原生 confirm 更有层次，但不喧宾夺主 ——
   内容居中、圆角、柔和阴影、按钮按重要性分级。
   ============================================================ */
.dlg{
  position:fixed;inset:0;z-index:400;display:flex;
  align-items:center;justify-content:center;padding:24px;
}
.dlg-mask{
  position:absolute;inset:0;
  background:rgba(12,28,48,.5);backdrop-filter:blur(2px);
}
.dlg-box{
  position:relative;z-index:1;
  display:grid;grid-template-columns:auto 1fr;grid-template-rows:1fr auto;
  gap:0 16px;
  width:min(440px,100%);max-width:100%;max-height:86vh;
  padding:24px 24px 0;
  background:#fff;border-radius:16px;
  box-shadow:0 24px 64px rgba(12,28,48,.28),0 2px 8px rgba(12,28,48,.1);
  overflow:hidden;
}
.dlg-out .dlg-box{opacity:0;transform:scale(.96) translateY(-6px);transition:.13s}
.dlg-in .dlg-box{animation:dlgPop .2s cubic-bezier(.2,.9,.3,1.1)}
@keyframes dlgPop{
  from{opacity:0;transform:scale(.94) translateY(10px)}
  to{opacity:1;transform:scale(1) translateY(0)}
}

/* ---- 图标 ---- */
.dlg-ico{
  grid-row:1;width:36px;height:36px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:19px;font-weight:700;flex:0 0 36px;
  background:#E8F2FD;color:#1565c0;
}
.dlg-ico.is-ok{background:#E4F7E9;color:#2e7d32}
.dlg-ico.is-warn{background:#FFF3E0;color:#e65100}
.dlg-ico.is-danger{background:#FFEBEE;color:#c62828}
.dlg-ico.is-info{background:#E8F2FD;color:#1565c0}

/* ---- 主体 ---- */
.dlg-main{grid-row:1;min-width:0;padding-top:2px}
.dlg-title{
  margin:0 0 6px;font-size:16.5px;font-weight:700;color:#12263f;line-height:1.4;
}
.dlg-msg{
  font-size:14px;color:#42576B;line-height:1.65;word-break:break-word;white-space:normal;
}
.dlg-msg:empty{display:none}
.dlg-detail{
  margin-top:10px;padding:9px 12px;border-radius:8px;
  background:#F7FAFD;border:1px solid #E6EDF4;
  font-size:12.5px;color:#6B7C8C;line-height:1.6;
}
.dlg-input{display:block;margin-top:14px}
.dlg-input input{
  width:100%;height:42px;padding:0 13px;font-size:14.5px;
  border:1px solid #D7E2EC;border-radius:9px;background:#FAFCFE;
  font-family:inherit;color:#1F2B38;transition:.14s;
}
.dlg-input input:focus{
  outline:0;background:#fff;border-color:#1E88E5;
  box-shadow:0 0 0 3px rgba(30,136,229,.14);
}
.dlg-input input.is-pw{letter-spacing:2px}

/* ---- 按钮 ---- */
.dlg-ft{
  grid-column:1/-1;grid-row:2;
  display:flex;justify-content:flex-end;gap:9px;
  margin:22px -24px 0;padding:14px 24px;
  background:#F8FAFC;border-top:1px solid #EDF1F6;
}
.dlg-btn{
  min-width:84px;height:38px;padding:0 18px;
  border:1px solid #D7E2EC;border-radius:9px;background:#fff;color:#42576B;
  font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;
  transition:.14s;white-space:nowrap;
}
.dlg-btn:hover{background:#F2F7FC;border-color:#B9CFE4;color:#1F2B38}
.dlg-btn:active{transform:translateY(1px)}
.dlg-btn:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(30,136,229,.2)}
.dlg-btn.primary{
  background:linear-gradient(135deg,#42a5f5,#1e88e5);color:#fff;border-color:transparent;
  font-weight:600;box-shadow:0 2px 8px rgba(30,136,229,.26);
}
.dlg-btn.primary:hover{
  background:linear-gradient(135deg,#1e88e5,#1565c0);color:#fff;
  box-shadow:0 4px 12px rgba(30,136,229,.34);
}
.dlg-btn.danger{
  background:linear-gradient(135deg,#ef5350,#e53935);color:#fff;border-color:transparent;
  font-weight:600;box-shadow:0 2px 8px rgba(229,57,53,.26);
}
.dlg-btn.danger:hover{background:linear-gradient(135deg,#e53935,#c62828);color:#fff;box-shadow:0 4px 12px rgba(229,57,53,.34)}
.dlg-btn.ghost{background:transparent;border-color:transparent;color:#6B7C8C}
.dlg-btn.ghost:hover{background:#EDF2F7;color:#42576B}

/* 危险弹窗：顶部一条细色带，强化"这是破坏性操作" */
.dlg-danger{border-top:3px solid #e53935;padding-top:22px}

/* ---- 手机端：底部弹层，拇指可达 ---- */
@media (max-width:820px){
  .dlg{align-items:flex-end;padding:0}
  .dlg-mask{background:rgba(12,28,48,.45)}
  .dlg-box{
    width:100%;max-height:88vh;border-radius:18px 18px 0 0;
    padding:20px 20px 0;
    animation:dlgUp .24s cubic-bezier(.2,.9,.3,1);
  }
  .dlg-in .dlg-box{animation:dlgUp .24s cubic-bezier(.2,.9,.3,1)}
  .dlg-out .dlg-box{transform:translateY(20px)}
  @keyframes dlgUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
  .dlg-ico{width:34px;height:34px;flex:0 0 34px;font-size:18px}
  .dlg-title{font-size:17px}
  .dlg-ft{margin:20px -20px 0;padding:13px 20px calc(13px + env(safe-area-inset-bottom))}
  /* 手机端按钮并排平分，触摸目标≥48px */
  .dlg-btn{flex:1;min-width:0;height:48px;font-size:15px;padding:0 12px}
  .dlg-input input{height:48px;font-size:16px}  /* 16px 防 iOS 自动放大 */
}

/* ============================================================
   系统设置
   ============================================================ */
.sys-sec{margin-bottom:20px}
.sys-sec:last-of-type{margin-bottom:8px}
.sys-sec h4{
  margin:0 0 12px;font-size:13px;font-weight:700;color:#42576B;
  display:flex;align-items:center;gap:7px;
}
.sys-sec h4::before{content:'';width:3px;height:13px;border-radius:2px;background:var(--blue,#1e88e5)}
.sys-sec .f{
  display:flex;align-items:center;gap:12px;margin-bottom:12px;flex-wrap:wrap;
}
.sys-sec .f>span{
  flex:0 0 82px;font-size:12.5px;color:var(--muted);font-weight:600;
}
.sys-sec .f>input[type=text]{
  flex:1 1 200px;height:38px;padding:0 12px;font-size:13.5px;
  border:1px solid #D7E2EC;border-radius:8px;background:#FAFCFE;
  font-family:inherit;color:#1F2B38;transition:.14s;
}
.sys-sec .f>input[type=text]:focus{
  outline:0;background:#fff;border-color:#1E88E5;box-shadow:0 0 0 3px rgba(30,136,229,.13);
}
.sys-sec .f>input[type=color]{
  width:52px;height:38px;padding:2px;border:1px solid #D7E2EC;
  border-radius:8px;background:#fff;cursor:pointer;
}
.sys-sec .f>small{flex:1 1 100%;font-size:11.5px;color:#8B9AAA;margin-top:2px}
.sys-sec .btn.xs{padding:0 12px;height:30px;font-size:12.5px;border-radius:7px}

/* Logo 预览 */
.logo-pick{display:flex;align-items:center;gap:12px;flex:1 1 100%}
.logo-prev{
  width:52px;height:52px;border-radius:12px;flex:0 0 52px;
  background:linear-gradient(135deg,#42a5f5,#1e88e5);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:26px;box-shadow:0 3px 10px rgba(30,136,229,.28);overflow:hidden;
}
.logo-prev img{width:100%;height:100%;object-fit:cover}
.logo-ops{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.logo-ops small{width:100%;font-size:11.5px;color:#8B9AAA}

/* 主题色板 */
.theme-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(78px,1fr));
  gap:9px;margin-bottom:14px;
}
.theme-swatch{
  border:1.5px solid #E3EAF2;background:#fff;border-radius:10px;
  padding:9px 6px 7px;cursor:pointer;font-family:inherit;
  display:flex;flex-direction:column;align-items:center;gap:6px;
  transition:.14s;
}
.theme-swatch:hover{border-color:var(--ts);transform:translateY(-1px);box-shadow:0 3px 10px rgba(0,0,0,.07)}
.theme-swatch.on{border-color:var(--ts);background:#F5F9FF;box-shadow:0 0 0 3px color-mix(in srgb,var(--ts) 18%,transparent)}
.theme-swatch i{
  width:26px;height:26px;border-radius:8px;display:block;
  background:linear-gradient(135deg,var(--ts),var(--td));
  box-shadow:0 2px 6px rgba(0,0,0,.14);
}
.theme-swatch span{font-size:11.5px;color:#5B6E80}

/* 侧栏 Logo 支持图片 */
.sb-logo.has-img{overflow:hidden;padding:0;line-height:1}
.sb-logo.has-img img{width:24px;height:24px;object-fit:cover;border-radius:6px;display:block}

/* ============================================================
   账号详情
   ============================================================ */
.me-head{
  display:flex;align-items:center;gap:13px;padding:16px 18px;
  background:linear-gradient(135deg,#F4F8FC,#FAFCFE);
  border-radius:11px;margin-bottom:16px;
}
.me-av{
  width:48px;height:48px;border-radius:14px;flex:0 0 48px;
  background:linear-gradient(135deg,#42a5f5,#1e88e5);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:21px;font-weight:700;box-shadow:0 3px 10px rgba(30,136,229,.26);
}
.me-id{flex:1;min-width:0}
.me-id b{display:block;font-size:16px;color:#12263f;line-height:1.3}
.me-id span{font-size:12.5px;color:#8B9AAA}
.me-role{
  flex:0 0 auto;background:#E8F2FD;color:#1565c0;
  font-size:12px;font-weight:600;padding:4px 11px;border-radius:12px;
}
.me-rows{border:1px solid #EDF1F6;border-radius:10px;overflow:hidden}
.me-row{
  display:flex;align-items:flex-start;gap:14px;padding:11px 15px;
  border-bottom:1px solid #F2F5F8;
}
.me-row:last-child{border-bottom:0}
.me-row:nth-child(odd){background:#FBFCFE}
.me-row>span{flex:0 0 78px;font-size:12.5px;color:#8B9AAA;font-weight:600}
.me-row>b{flex:1;font-size:13.5px;font-weight:500;color:#26313D;line-height:1.6;word-break:break-word}
