/* MT 页面沿用现有布局；基础颜色继承 custom.css 的项目主题，避免与工作台色系脱节。
   此处只定义面板辅助色，按钮与详情操作直接复用项目公共样式。 */
.mt-page {
    --mt-soft: #eaf4f1; --mt-accent-soft: var(--copy-mint);
    overflow: auto; background: var(--copy-canvas); color: var(--copy-ink); font-size: 14px;
}
/* ZK assigns the constrained height to this inner node. Scrolling on Window alone
   cannot reveal content clipped by the inner node's default overflow:hidden. */
.mt-page > .z-window-content { overflow: auto; background: var(--copy-canvas); }
.mt-content { max-width: 1460px; margin: 0 auto; padding: 24px 28px 32px; box-sizing: border-box; }
.mt-toolbar, .mt-actions, .mt-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt-toolbar { justify-content: space-between; margin-bottom: 16px; }
.mt-content > .mt-toolbar, .mt-topbar {
    padding: 18px 20px; border: 1px solid var(--copy-line); border-radius: 12px; background: #fff;
}
.mt-topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.mt-heading { min-width: 0; }
.mt-top-actions { justify-content: flex-end; max-width: 450px; }
.mt-title, .mt-card-title, .mt-help, .mt-chain, .mt-feedback, .mt-strong { display: block; }
.mt-title { font-size: 23px; font-weight: 700; line-height: 1.3; }
.mt-card { padding: 18px 20px; margin: 16px 0; border: 1px solid var(--copy-line); border-radius: 12px; background: #fff; min-width: 0; }
.mt-card-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.mt-help { color: var(--copy-muted); font-size: 12px; line-height: 1.7; margin: 6px 0; }
.mt-feedback { color: var(--copy-muted); min-height: 20px; font-size: 12px; margin: 8px 0 12px; overflow-wrap: anywhere; }
.mt-badge { display: inline-block; border: 1px solid var(--copy-line); border-radius: 6px; padding: 4px 8px; font-size: 12px; white-space: nowrap; }
.mt-badge-good { color: #24724b; background: #e2f5ea; border-color: #c5e4db; }
.mt-badge-warn { color: #7a5417; background: #f6efdf; border-color: #ddc894; }
.mt-badge-bad { color: #a44943; background: #fff2f0; border-color: #f0d4d1; }
.mt-badge-info { color: var(--copy-teal-dark); background: var(--mt-accent-soft); border-color: #c5e4db; }
.mt-metrics-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.mt-metric { display: grid; gap: 5px; align-content: start; padding: 15px 16px; border: 1px solid var(--copy-line); border-radius: 12px; background: #fff; min-width: 0; }
.mt-metric-label { color: var(--copy-ink); font-size: 12px; font-weight: 600; }
.mt-metric-value { font-size: 28px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; }
.mt-metric-foot { color: var(--copy-muted); font-size: 11px; line-height: 1.5; }
.mt-metric-good .mt-metric-value { color: #24724b; }
.mt-metric-warn .mt-metric-value { color: #9a6b1f; }
.mt-metric-bad .mt-metric-value { color: #a44943; }
.mt-dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.mt-dashboard-grid > .mt-card { margin: 0; }
.mt-span-7 { grid-column: span 7; }
.mt-span-5 { grid-column: span 5; }
.mt-readonly .mt-command-card { grid-column: span 12; }
.mt-panel { padding: 0; overflow: hidden; }
.mt-card-head { padding: 14px 18px; border-bottom: 1px solid var(--copy-line); background: var(--mt-soft); }
.mt-card-head .mt-help { margin-bottom: 0; }
.mt-card-body { padding: 18px; }
.mt-account-chain { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); gap: 12px; align-items: center; }
.mt-account-box { padding: 14px; border: 1px solid var(--copy-line); border-radius: 8px; background: #fbfdfd; min-width: 0; }
.mt-account-role, .mt-account-name, .mt-account-symbol { display: block; overflow-wrap: anywhere; }
.mt-account-role { color: var(--copy-muted); font-size: 12px; }
.mt-account-name { font-size: 18px; font-weight: 700; margin: 6px 0; }
.mt-account-symbol { font-family: ui-monospace, monospace; color: var(--copy-teal-dark); font-size: 14px; }
.mt-chain-arrow { font-size: 28px; color: var(--copy-teal); text-align: center; }
.mt-download-panel { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--copy-line); }
.mt-strong { font-size: 13px; font-weight: 600; line-height: 1.7; }
.mt-has-error { border-color: #f0d4d1; }
.mt-has-error .mt-card-head { background: #fff2f0; }
.mt-chain { font-size: 14px; line-height: 1.8; margin: 14px 0; overflow-wrap: anywhere; }
.mt-note { display: block; padding: 10px 12px; margin: 10px 0 16px; background: #f6efdf; color: #7a5417; border-radius: 6px; font-size: 12px; line-height: 1.7; }
.mt-error-detail { display: block; color: #a44943; overflow-wrap: anywhere; line-height: 1.8; font-size: 13px; margin: 10px 0; }
.mt-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 16px 0; }
.mt-manual-panel .mt-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mt-field { min-width: 0; }
.mt-field > .z-label { display: block; margin-bottom: 7px; color: var(--copy-muted); font-size: 12px; }
.mt-page .z-textbox, .mt-page .z-combobox-input { border-color: #cbdcda; border-radius: 6px; background: #fbfdfd; color: var(--copy-ink); box-shadow: none; }
.mt-page .z-textbox:focus, .mt-page .z-combobox-input:focus { border-color: var(--copy-teal); }
.mt-page .admin-button { border-radius: 6px; box-shadow: none; font-size: 12px; min-height: 34px; }
.mt-table-scroll { overflow-x: auto; margin-top: 14px; }
.mt-table { min-width: 1060px; border-color: var(--copy-line); }
.mt-command-table { min-width: 830px; }
.mt-page .mt-table .z-listbox { border-color: var(--copy-line); }
.mt-page .mt-table .z-listcell-content { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--copy-ink); font-size: 12px; }
.mt-page .mt-table .z-listitem, .mt-page .mt-table .z-listitem.z-listbox-odd { background: #fff; }
.mt-page .mt-table .z-listcell { border-bottom: 1px solid #eef2f1; }
.mt-page .mt-table .z-paging { background: #fbfdfd; border-color: var(--copy-line); }
.mt-page .mt-table .mt-cell-good .z-listcell-content { color: #24724b; font-weight: 600; }
.mt-page .mt-table .mt-cell-bad .z-listcell-content { color: #a44943; font-weight: 600; }
.mt-page .mt-table .mt-cell-warn .z-listcell-content { color: #9a6b1f; font-weight: 600; }
@media (max-width: 1150px) {
    .mt-topbar { flex-direction: column; }
    .mt-top-actions { max-width: none; justify-content: flex-start; }
    .mt-span-7, .mt-span-5 { grid-column: span 12; }
    .mt-metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .mt-content { padding: 12px; }
    .mt-card { padding: 16px; }
    .mt-panel { padding: 0; }
    .mt-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mt-form-grid, .mt-manual-panel .mt-form-grid { grid-template-columns: 1fr; }
    .mt-account-chain { grid-template-columns: 1fr; }
    .mt-chain-arrow { transform: rotate(90deg); }
}
