/* look-gate: on */
/* 总账 · 期末计提 / 结转损益页（web/gl_closing.js；glc 线）。
   ★ 所有规则以 `html.sh-on .glc` 开头，只作用在容器 .glc 内。
   设计总纲：字阶 13/16/20/24、间距 4 的倍数、圆角 8/12/999、一个强调色、语义色只在小面积状态里。 */

/* 区块 */
html.sh-on .glc .glc-section { margin: 16px 0; }

/* 折叠标题 */
html.sh-on .glc summary { display: list-item; list-style-position: inside; min-height: 32px; line-height: 32px; }

/* 区块小标题 */
html.sh-on .glc .glc-sec-title { font-size: 16px; font-weight: 600; color: var(--g-ink); margin: 0 0 8px; }

/* 卡片 */
html.sh-on .glc .glc-card { border: 1px solid var(--g-line); border-radius: 12px; padding: 16px; background: #fff; margin-bottom: 16px; }

/* 卡头 */
html.sh-on .glc .glc-card-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }

/* 卡标题 */
html.sh-on .glc .glc-card-title { font-size: 16px; font-weight: 600; color: var(--g-ink); }

/* 大金额 */
html.sh-on .glc .glc-amount { font-size: 20px; font-weight: 600; color: var(--g-ink); text-align: right; font-variant-numeric: tabular-nums; }

/* 卡身 */
html.sh-on .glc .glc-body { }

/* 取数过程小表 / 分录小表 / 结转凭证行表 */
html.sh-on .glc .glc-steps,
html.sh-on .glc .glc-lines,
html.sh-on .glc .glc-closing-lines { font-size: 13px; width: 100%; overflow-x: auto; }
html.sh-on .glc .glc-steps table,
html.sh-on .glc .glc-lines table,
html.sh-on .glc .glc-closing-lines table { width: 100%; border-collapse: collapse; font-size: 13px; }
html.sh-on .glc .glc-steps th,
html.sh-on .glc .glc-lines th,
html.sh-on .glc .glc-closing-lines th { color: var(--g-ink2); font-weight: 600; text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--g-line); }
html.sh-on .glc .glc-steps td,
html.sh-on .glc .glc-lines td,
html.sh-on .glc .glc-closing-lines td { padding: 4px 8px; border-bottom: 1px solid var(--g-line); }

/* 调整并生成面板 */
html.sh-on .glc .glc-adjust { background: var(--g-wash); border-radius: 8px; padding: 12px; margin-top: 12px; }

/* 面板行 */
html.sh-on .glc .glc-adjust-row { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 8px; }
html.sh-on .glc .glc-adjust-row:last-child { margin-bottom: 0; }

/* 输入框通用 */
html.sh-on .glc .glc-amt-input,
html.sh-on .glc .glc-rate-input,
html.sh-on .glc .glc-acc-input,
html.sh-on .glc .glc-edit-amt { height: 32px; border: 1px solid var(--g-ctl); border-radius: 8px; padding: 0 8px; font-size: 13px; line-height: 20px; color: var(--g-ink); background: #fff; }
html.sh-on .glc .glc-amt-input:focus-visible,
html.sh-on .glc .glc-rate-input:focus-visible,
html.sh-on .glc .glc-acc-input:focus-visible,
html.sh-on .glc .glc-edit-amt:focus-visible { outline: 2px solid var(--g-blue); outline-offset: 0; }

/* 金额/编辑金额输入：右对齐、等宽、128px */
html.sh-on .glc .glc-amt-input,
html.sh-on .glc .glc-edit-amt { text-align: right; font-variant-numeric: tabular-nums; width: 128px; }

/* 税率输入：80px */
html.sh-on .glc .glc-rate-input { width: 80px; }

/* 科目输入：160px */
html.sh-on .glc .glc-acc-input { width: 160px; }

/* % 小字 */
html.sh-on .glc .glc-pct { color: var(--g-ink2); font-size: 13px; line-height: 20px; }

/* 标签文字 */
html.sh-on .glc .glc-lbl { color: var(--g-ink2); font-size: 13px; line-height: 20px; }

/* 税率区 details */
html.sh-on .glc .glc-rates { border: 1px solid var(--g-line); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
html.sh-on .glc .glc-rates summary { font-weight: 600; cursor: pointer; font-size: 16px; color: var(--g-ink); display: list-item; list-style-position: inside; min-height: 32px; line-height: 32px; }

/* 税率表 */
html.sh-on .glc .glc-rates-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
html.sh-on .glc .glc-rates-tbl th { color: var(--g-ink2); font-weight: 600; text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--g-line); }
html.sh-on .glc .glc-rates-tbl td { padding: 4px 8px; border-bottom: 1px solid var(--g-line); }

/* 勾选框标签 */
html.sh-on .glc .glc-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--g-ink); }

/* 小标签胶囊 */
html.sh-on .glc .glc-voucher-tag { display: inline-block; border-radius: 999px; padding: 0 8px; font-size: 13px; line-height: 20px; background: var(--g-blue-soft); color: var(--g-blue); }

/* 借贷合计行 */
html.sh-on .glc .glc-sums { display: flex; justify-content: flex-end; gap: 24px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--g-ink); margin-top: 12px; }

/* 提示占位 */
html.sh-on .glc .glc-note-slot { margin-bottom: 8px; }
html.sh-on .glc .glc-note-slot:empty { display: none; }

/* 灰色小字 */
html.sh-on .glc .glc-dim { color: var(--g-ink2); font-size: 13px; line-height: 20px; }

/* 成功状态 */
html.sh-on .glc .glc-ok { color: var(--g-ok); font-weight: 600; }

/* 错误状态 */
html.sh-on .glc .glc-bad { color: var(--g-bad); font-weight: 600; }

/* 输入框上的错误状态：红边框 */
html.sh-on .glc input.glc-bad { border-color: var(--g-bad); }

/* 警告小条 */
html.sh-on .glc .glc-warn { color: var(--g-warn); background: var(--g-warn-bg); border-radius: 8px; padding: 4px 12px; font-size: 13px; line-height: 20px; margin-bottom: 4px; }

/* 手机宽度适配 */
@media (max-width: 900px) {
  html.sh-on .glc summary { min-height: 44px; line-height: 44px; }
  html.sh-on .glc .glc-rates summary { min-height: 44px; line-height: 44px; }
}

@media (max-width: 640px) {
  html.sh-on .glc .glc-card { padding: 12px; }
  html.sh-on .glc .glc-steps,
  html.sh-on .glc .glc-lines,
  html.sh-on .glc .glc-closing-lines { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  html.sh-on .glc .glc-amt-input,
  html.sh-on .glc .glc-edit-amt { width: 100%; max-width: 128px; }
  html.sh-on .glc .glc-acc-input { width: 100%; max-width: 160px; }
  html.sh-on .glc .glc-rate-input { width: 100%; max-width: 80px; }
  html.sh-on .glc .glc-adjust-row { gap: 8px; }
  html.sh-on .glc .glc-sums { gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
  html.sh-on .glc.glr .glr-bar { flex-wrap: wrap; overflow-x: visible; }
  html.sh-on .glc.glr .glr-bar .glr-seg { flex: 1 1 100%; width: 100%; max-width: 100%; display: flex; }
  html.sh-on .glc.glr .glr-bar .glr-seg button { flex: 1 1 0; min-width: 0; }
  html.sh-on .glc .glc-closing-lines th:nth-child(2), html.sh-on .glc .glc-closing-lines td:nth-child(2) { display: none; }
  html.sh-on :is(#app,#assetsApp,#equipApp,#keyApp,#certApp,#opsApp,#leadsApp,#contractsApp,#billingApp,#extApp,.modal) .glc table.glc-closing-lines { table-layout: fixed; width: 100%; }
  html.sh-on .glc .glc-closing-lines th:nth-child(1), html.sh-on .glc .glc-closing-lines td:nth-child(1) { width: 30%; white-space: normal; overflow-wrap: anywhere; }
  html.sh-on .glc .glc-closing-lines th:nth-child(3), html.sh-on .glc .glc-closing-lines td:nth-child(3) { width: 35%; }
  html.sh-on .glc .glc-closing-lines th:nth-child(4), html.sh-on .glc .glc-closing-lines td:nth-child(4) { width: 35%; }
  html.sh-on :is(#app,#assetsApp,#equipApp,#keyApp,#certApp,#opsApp,#leadsApp,#contractsApp,#billingApp,#extApp,.modal) .glc input.glc-edit-amt:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]) { padding: 0 4px; font-size: 13px; line-height: 20px; min-width: 0; width: 100%; max-width: none; box-sizing: border-box; }
  html.sh-on .glc .glc-check { flex: 0 0 auto; white-space: nowrap; }
}

/* 年份/月份下拉：skin.css 修好右内边距 36 后自适应宽度放不下「2026年」+箭头位，给最小宽度 */
html.sh-on .glc:is(#extApp *, #billingApp *) .glr-mp select[data-mp="y"]{min-width:112px}
html.sh-on .glc:is(#extApp *, #billingApp *) .glr-mp select[data-mp="m"]{min-width:96px}

html.sh-on .glc:is(#extApp *, #billingApp *) .glc-title{margin:0 0 4px;font-size:24px;line-height:32px;font-weight:600;color:var(--g-ink)}
html.sh-on .glc:is(#extApp *, #billingApp *) .glc-lead{margin:0 0 16px;font-size:13px;line-height:20px;color:var(--g-ink2)}
@media (max-width:900px){ html.sh-on .glc:is(#extApp *, #billingApp *) .glc-title{font-size:20px;line-height:28px} }
