/* look-gate: on */
/* 总账录入（台账后台「账务 › 总账」：凭证 / 期间与结账 / 经营速览；电脑与企业微信手机同一页面）。
   按《设计总纲》：字阶 13/16/20/24、间距 4 的倍数、圆角 8/12/16/999、不带影（只有提示条是浮层）、一个强调色（品牌蓝）、状态用胶囊、尊重「减少动画」。
   所有规则都带 html.sh-on（只在新外壳里出现，tests/test_gl_entry_css_scoping.py 锁死）。手机（≤900）单列、点击区 ≥44、不横向滚动。 */
html.sh-on .gle{--surface:#fff;--line:#e4e7ec;--ink:#101828;--ink2:#475467;--blue:#0265c2;--blue-soft:#e8f1fb;--ok:#067647;--ok-bg:#ecfdf3;--warn:#b54708;--warn-bg:#fffaeb;--bad:#b42318;--bad-bg:#fef3f2;
  --ease:cubic-bezier(.2,0,0,1);max-width:960px;margin:0 auto;padding:16px 0 32px;font-size:16px;line-height:24px;color:var(--ink)}
html.sh-on .gle *{box-sizing:border-box}
html.sh-on .gle :focus-visible{outline:2px solid var(--blue);outline-offset:2px}
html.sh-on .gle .gle-sr{position:absolute;width:1px;height:1px;padding:0;border:0;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%)}
html.sh-on .gle input,html.sh-on .gle select,html.sh-on .gle button{margin:0;font:inherit}

html.sh-on .gle-head{display:flex;flex-direction:column;gap:12px;align-items:flex-start;margin-bottom:16px}
html.sh-on .gle-head h1{margin:0;font-size:24px;line-height:32px;font-weight:600}
@media (max-width:900px){html.sh-on .gle-head h1{font-size:20px;line-height:28px}}
html.sh-on .gle-tip{margin:4px 0 0;font-size:13px;line-height:20px;color:var(--ink2)}
html.sh-on .gle-tip.warn{color:var(--warn)}
html.sh-on .gle-hint{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink2);font-size:13px;line-height:20px}
html.sh-on .gle-hint .gle-hint-t{flex:1;min-width:0}
html.sh-on .gle-hint a.gle-btn{display:inline-flex;align-items:center;min-height:32px;text-decoration:none}
html.sh-on .gle-tip.full{grid-column:1/-1}
html.sh-on .gle-pick select,html.sh-on .gle-pick input{min-height:32px;padding:4px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink)}
html.sh-on .gle-pick select{min-width:150px}

/* 结论带：一句话 + 一个主动作 */
html.sh-on .gle-band{display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;margin-bottom:16px;padding:16px;border-radius:12px;background:var(--blue-soft)}
html.sh-on .gle-band .s{margin:0;color:var(--ink)}
html.sh-on .gle-band b{font-weight:600;color:var(--blue)}

/* 按钮 / 胶囊 */
html.sh-on .gle-btn{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:4px 16px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-size:16px;line-height:24px;white-space:nowrap;cursor:pointer;transition:background-color .15s var(--ease),border-color .15s var(--ease)}
html.sh-on .gle-btn:hover{border-color:#c9d1dc;background:#f8fafc}
html.sh-on .gle-btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}
html.sh-on .gle-btn.primary:hover{background:#0358a8}
html.sh-on .gle-btn.danger{color:var(--bad);border-color:#f4c7c3}
html.sh-on .gle-btn:disabled{opacity:.5;cursor:not-allowed}
html.sh-on .gle-chip{display:inline-flex;align-items:center;height:24px;box-sizing:border-box;padding:0 8px;border-radius:999px;font-size:13px;line-height:20px;font-weight:600;background:#eef1f5;color:var(--ink2);white-space:nowrap}
html.sh-on .gle-chip.ok{background:var(--ok-bg);color:var(--ok)}
html.sh-on .gle-chip.warn{background:var(--warn-bg);color:var(--warn)}
html.sh-on .gle-chip.bad{background:var(--bad-bg);color:var(--bad)}
html.sh-on .gle-chip.mute{background:#f2f4f7;color:#667085}
html.sh-on .gle-n{font-variant-numeric:tabular-nums}

/* 列表工具条 */
html.sh-on .gle-bar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin-bottom:12px}
html.sh-on .gle-tabs{display:flex;flex-wrap:wrap;gap:4px}
html.sh-on :is(#app,#extApp,.modal) .gle-tab{min-height:32px;padding:4px 12px;border:0;border-radius:8px;background:transparent;color:var(--ink2);cursor:pointer;white-space:nowrap}
html.sh-on :is(#app,#extApp,.modal) .gle-tab b{font-weight:600}
html.sh-on :is(#app,#extApp,.modal) .gle-tab.on{background:var(--blue-soft);color:var(--ink);font-weight:600;box-shadow:inset 0 0 0 1px var(--blue)}
html.sh-on .gle-search{display:flex;gap:8px}
html.sh-on .gle-search input{min-height:32px;min-width:200px;padding:4px 12px;border:1px solid var(--line);border-radius:8px}

html.sh-on .gle-list{display:flex;flex-direction:column;gap:8px}
html.sh-on .gle-row{display:flex;gap:12px;align-items:center;width:100%;padding:12px 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);text-align:left;cursor:pointer;transition:border-color .2s var(--ease)}
html.sh-on .gle-row:hover{border-color:#c9d1dc}
html.sh-on .gle-row .no{flex:none;min-width:64px;font-weight:600}
html.sh-on .gle-row .main{flex:1;min-width:0;display:flex;flex-direction:column}
html.sh-on .gle-row .t{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.sh-on .gle-row .s{font-size:13px;line-height:20px;color:var(--ink2)}
html.sh-on .gle-row .amt{flex:none}

html.sh-on .gle-card{margin-bottom:16px;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
html.sh-on .gle-card h3,html.sh-on .gle-co h3{margin:0 0 4px;font-size:20px;line-height:28px;font-weight:600}
html.sh-on .gle-back{margin-bottom:12px}
html.sh-on .gle-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;align-items:center}

/* 凭证明细表 */
html.sh-on .gle-tbl{margin-top:16px;border:1px solid var(--line);border-radius:8px;overflow:hidden}
html.sh-on .gle-tr{display:grid;grid-template-columns:1.4fr 2fr 1fr 1fr;gap:12px;padding:8px 12px;border-top:1px solid var(--line)}
html.sh-on .gle-tr:first-child{border-top:0}
html.sh-on .gle-th{background:#f8fafc;font-size:13px;line-height:20px;color:var(--ink2);font-weight:600}
html.sh-on .gle-tt{background:#f8fafc;font-weight:600}
html.sh-on .gle-tr .r{text-align:right}
html.sh-on .gle-tr .aux{display:block;font-size:13px;line-height:20px;color:var(--ink2);font-style:normal}

/* 编辑器 */
html.sh-on .gle-fields{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}
html.sh-on .gle-fields select{min-width:96px}
html.sh-on .gle-tpl{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;margin-top:12px}
html.sh-on .gle-tpl select{min-width:220px;max-width:100%}
html.sh-on .gle .f{display:flex;flex-direction:column;gap:4px;min-width:0}
html.sh-on .gle .f>span{font-size:13px;line-height:20px;color:var(--ink2)}
html.sh-on .gle .f.grow{flex:1;min-width:200px}
html.sh-on .gle .f input,html.sh-on .gle-form input{min-height:32px;padding:4px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);width:100%}
html.sh-on .gle .f input[aria-invalid="true"]{border-color:var(--bad)}
html.sh-on .gle-ln{display:grid;grid-template-columns:2fr 3fr 1.4fr 1.4fr;gap:8px 12px;margin-top:12px;padding:12px;border:1px solid var(--line);border-radius:8px}
html.sh-on .gle-ln-h{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center}
html.sh-on .gle-ln-no{font-size:13px;line-height:20px;color:var(--ink2);font-weight:600}
html.sh-on .gle-ln .aux{grid-column:1/-1}
html.sh-on .gle-x{min-height:32px;padding:0 8px;border:0;background:transparent;color:var(--bad);cursor:pointer;font-size:13px;line-height:20px}
html.sh-on .gle-sum{display:flex;flex-wrap:wrap;gap:16px;margin-top:16px;padding:12px;border-radius:8px;background:#f8fafc}
html.sh-on .gle-sum .ok{color:var(--ok);font-weight:600}
html.sh-on .gle-sum .warn{color:var(--warn);font-weight:600}
html.sh-on .gle .err{min-height:20px;margin-top:8px;font-size:13px;line-height:20px;color:var(--bad)}

/* 操作空间（就地展开的面板，不用弹窗） */
html.sh-on .gle-form{margin-top:16px;padding:16px;border:1px solid var(--line);border-radius:12px;background:#f8fafc}
html.sh-on .gle-form label{display:block;margin-top:8px;font-size:13px;line-height:20px;color:var(--ink2)}
html.sh-on .gle-form .row{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
html.sh-on .gle-pv{margin-top:12px;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
html.sh-on .gle-pvr{display:flex;justify-content:space-between;gap:12px;font-size:13px;line-height:20px;color:var(--ink2)}

/* 结账检查 / 反结账申请 */
html.sh-on .gle-chk{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
html.sh-on .gle-chk li{display:flex;gap:8px;align-items:flex-start}
html.sh-on .gle-chk .m{flex:none;width:20px;font-weight:600}
html.sh-on .gle-chk .ok .m{color:var(--ok)}
html.sh-on .gle-chk .bad .m{color:var(--bad)}
html.sh-on .gle-chk .warn .m{color:var(--warn)}
html.sh-on .gle-rq{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;padding:12px 0;border-top:1px solid var(--line)}
html.sh-on .gle-rq:first-of-type{border-top:0}

/* 经营速览 */
html.sh-on .gle-co{margin-bottom:24px;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
html.sh-on .gle-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:12px}
html.sh-on .gle-kpi{display:flex;flex-direction:column;gap:4px;padding:12px;border-radius:8px;background:#f8fafc}
html.sh-on .gle-kpi .k{font-size:13px;line-height:20px;color:var(--ink2)}
html.sh-on .gle-kpi .v{font-size:20px;line-height:28px;font-weight:600;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
html.sh-on .gle-kpi.hero{grid-column:span 2;background:var(--blue-soft)}
html.sh-on .gle-kpi.hero .v{font-size:24px;line-height:32px;color:var(--blue)}
html.sh-on .gle-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}

/* 四态：空 / 载入骨架 / 出错 */
html.sh-on .gle-empty{padding:32px 16px;border:1px dashed var(--line);border-radius:12px;text-align:center;color:var(--ink2)}
html.sh-on .gle-empty p{margin:0 0 8px}
html.sh-on .gle-skel{display:flex;flex-direction:column;gap:12px}
html.sh-on .gle-skel i{display:block;height:48px;border-radius:12px;background:linear-gradient(90deg,#eef1f5 25%,#f6f8fa 50%,#eef1f5 75%);background-size:200% 100%;animation:gle-sh 1.4s var(--ease) infinite}
@keyframes gle-sh{to{background-position:-200% 0}}

html.sh-on .gle-toast{position:fixed;left:50%;bottom:32px;z-index:9999;max-width:min(560px,90vw);padding:12px 16px;border-radius:12px;background:#101828;color:#fff;font-size:16px;line-height:24px;box-shadow:0 8px 24px rgba(16,24,40,.24);transform:translateX(-50%)}
html.sh-on .gle-toast.bad{background:var(--bad)}

@media (max-width:900px){
  html.sh-on .gle{padding:16px 0 32px}
  html.sh-on .gle-btn,html.sh-on :is(#app,#extApp,.modal) .gle-tab,html.sh-on .gle-x{min-height:44px}
  html.sh-on .gle-pick select,html.sh-on .gle-pick input,html.sh-on .gle-search input,html.sh-on .gle .f input,html.sh-on .gle-form input{min-height:44px}
  html.sh-on .gle-search{width:100%}
  html.sh-on .gle-search input{flex:1;min-width:0}
  html.sh-on .gle-band .gle-btn{width:100%}
  html.sh-on .gle-row{flex-wrap:wrap;min-height:44px}
  html.sh-on .gle-row .main{flex:1 1 60%}
  html.sh-on .gle-row .amt{margin-left:auto}
  html.sh-on .gle-tr{grid-template-columns:1fr 1fr}
  html.sh-on .gle-th{display:none}
  html.sh-on .gle-tr>span:nth-child(1),html.sh-on .gle-tr>span:nth-child(2){grid-column:1/-1}
  html.sh-on .gle-tr .r{text-align:left}
  html.sh-on .gle-tr>span[data-l]:not(.r)::before{content:attr(data-l) '：';color:var(--ink2);font-size:13px}
  html.sh-on .gle-tr .r[data-l]::before{content:attr(data-l) ' ';color:var(--ink2);font-size:13px}
  html.sh-on .gle-ln{grid-template-columns:1fr 1fr}
  html.sh-on .gle-ln .sum,html.sh-on .gle-ln .acc,html.sh-on .gle-ln .aux{grid-column:1/-1}
  html.sh-on .gle-kpis{grid-template-columns:1fr 1fr}
  html.sh-on .gle-kpi.hero{grid-column:1/-1}
  html.sh-on .gle-acts .gle-btn{flex:1 1 auto}
  html.sh-on .gle-toast{bottom:96px}
}
@media (prefers-reduced-motion:reduce){
  html.sh-on .gle-skel i{animation:none}
  html.sh-on .gle-btn,html.sh-on .gle-row{transition:none}
}

/* 凭证体验：科目下拉/余额/大写、列表筛选/排序/勾选/行操作/导出 */
html.sh-on .gle-acc-pop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 260px;
  width: 100%;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: 20;
  list-style: none;
  margin: 0;
  padding: 0;
}
html.sh-on .gle-acc-pop[hidden] {
  display: none;
}
html.sh-on .gle-acc-pop li {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
html.sh-on .gle-acc-pop li b {
  font-weight: 600;
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}
html.sh-on .gle-acc-pop li.on {
  background: var(--blue-soft);
}
html.sh-on .gle-acc-pop li.none {
  color: var(--ink2);
  cursor: default;
}
html.sh-on .gle-bal {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
}
html.sh-on .gle-bal:empty {
  display: none;
}
html.sh-on .gle-upper {
  flex-basis: 100%;
  font-weight: 600;
  color: var(--ink);
}
html.sh-on .gle-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
html.sh-on .gle-dot {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--surface);
  font-size: 13px;
  margin-left: 4px;
  align-items: center;
  justify-content: center;
}
html.sh-on .gle-menu {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
html.sh-on .gle-filter {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 16px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
html.sh-on .gle-filter .row {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}
html.sh-on .gle-filter>.gle-btn {
  justify-self: start;
}
html.sh-on .gle-sortbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink2);
}
html.sh-on :is(#app,#extApp,.modal) .gle-sortbar .gle-btn {
  min-height: 28px;
  padding: 4px 12px;
  font-size: 13px;
  line-height: 20px;
}
html.sh-on :is(#app,#extApp,.modal) .gle-sortbar .gle-btn.on {
  background: var(--blue-soft);
  border-color: var(--blue);
  font-weight: 600;
  box-shadow:inset 0 0 0 1px var(--blue);
}
html.sh-on .gle-row {
  cursor: default;
  padding: 12px 16px;
}
html.sh-on .gle-sel {
  flex: none;
}
html.sh-on .gle-rowmain {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
html.sh-on .gle-rowops {
  flex: none;
  display: flex;
  gap: 4px;
}
html.sh-on .gle-rowops button {
  min-height: 28px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
}
html.sh-on .gle-rowops button:hover {
  background: #f8fafc;
}
html.sh-on :is(#app,#assetsApp,#equipApp,#keyApp,#certApp,#opsApp,#leadsApp,#contractsApp,#billingApp,#extApp,.modal) .gle-row .gle-rowmain { height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit; text-align: left; }
@media (max-width: 900px) {
  html.sh-on .gle-menu {
    flex-direction: column;
  }
  html.sh-on .gle-menu .gle-btn {
    width: 100%;
  }
  html.sh-on .gle-sortbar .gle-btn {
    min-height: 44px;
  }
  html.sh-on .gle-row {
    flex-wrap: wrap;
  }
  html.sh-on .gle-rowmain { flex-wrap: wrap; row-gap: 4px; }
  html.sh-on .gle-row .gle-rowmain .main { flex: 1 1 100%; order: 3; }
  html.sh-on .gle-row .gle-rowmain .amt { margin-left: auto; }
  html.sh-on .gle-rowmain {
    flex: 1 1 70%;
  }
  html.sh-on .gle-rowops {
    width: 100%;
  }
  html.sh-on .gle-rowops button {
    min-height: 44px;
    flex: 1;
  }
}
html.sh-on .gle .f select{min-height:32px;padding:4px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);width:100%}
@media (max-width:900px){html.sh-on .gle .f select{min-height:44px}}
@media (min-width:901px){html.sh-on .gle{margin-left:0;padding-left:0}}
html.sh-on .gle-selall{display:inline-flex;align-items:center;gap:8px;min-height:32px;font-size:13px;color:var(--ink2);white-space:nowrap;cursor:pointer;line-height:20px}
@media (max-width:900px){html.sh-on :is(#app,#extApp,.modal) label.gle-selall:has(> input[type=checkbox]){min-height:44px}}
@media (max-width:900px){html.sh-on :is(#app,#extApp,.modal) .gle-sortbar .gle-btn{min-height:44px}}
