/* زانا ریپورت — نمایشگر (همخوان با متغیرهای رنگ Zana.Blazor) */
.zr-viewer { display: flex; flex-direction: column; height: 100%; min-height: 24rem; }
.zr-viewer__bar { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: .35rem .5rem; border-block-end: 1px solid var(--p-border, #d9dee6); background: var(--p-surface, #fff); }
.zr-viewer__bar .zr-sep { width: 1px; align-self: stretch; background: var(--p-border, #d9dee6); margin-inline: .25rem; }
.zr-viewer__page-input { width: 4.2rem; text-align: center; }
.zr-viewer__status { font-size: .85em; color: var(--p-muted, #667085); margin-inline-start: auto; }
.zr-viewer__scroll { flex: 1; overflow: auto; background: var(--p-canvas, #e9ecef); padding: 1rem 0; }
.zr-viewer__page { margin: 0 auto 1rem; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .25); }
.zr-viewer__page > svg { display: block; width: 100%; height: auto; }
.zr-viewer__page text { white-space: pre; }
.zr-viewer__more { display: flex; justify-content: center; padding: .5rem; }
.zr-viewer__errors { margin: .5rem; }
.zr-viewer__empty { padding: 3rem 1rem; text-align: center; color: var(--p-muted, #667085); }
@media print { .zr-viewer__bar { display: none; } }

/* ═══════════ طراح گزارش ═══════════ */
.zd { display: flex; flex-direction: column; height: 100%; min-height: 30rem; }
.zd-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .3rem .5rem; border-block-end: 1px solid var(--p-border, #d9dee6); background: var(--p-surface, #fff); }
.zd-bar .zr-sep { width: 1px; align-self: stretch; background: var(--p-border, #d9dee6); margin-inline: .2rem; }
.zd-bar__zoom { min-width: 3rem; text-align: center; font-size: .85em; }
.zd-bar__check { display: inline-flex; align-items: center; gap: .25rem; font-size: .85em; white-space: nowrap; }
.zd-bar__select { width: 4.2rem; padding-block: .1rem; }
.zd-bar__spacer { flex: 1; }
.zd-main { flex: 1; display: grid; grid-template-columns: 12rem 1fr 19rem; min-height: 0; }
.zd-main[hidden] { display: none; }
.zd-toolbox, .zd-props { overflow: auto; padding: .4rem; background: var(--p-surface, #fff); }
.zd-toolbox { border-inline-end: 1px solid var(--p-border, #d9dee6); display: flex; flex-direction: column; gap: .15rem; }
.zd-props { border-inline-start: 1px solid var(--p-border, #d9dee6); font-size: .85em; }
.zd-toolbox__title { font-size: .78em; font-weight: 600; color: var(--p-muted, #667085); margin: .5rem .2rem .2rem; text-transform: uppercase; }
.zd-tool { display: flex; align-items: center; gap: .45rem; width: 100%; padding: .3rem .4rem; border: 1px solid transparent; border-radius: 6px; background: none; cursor: grab; font: inherit; font-size: .88em; color: inherit; text-align: start; touch-action: none; }
.zd-tool:hover, .zd-tool:focus-visible { background: var(--p-hover, #eef2f7); border-color: var(--p-border, #d9dee6); }
.zd-tool svg { width: 16px; height: 16px; flex: none; }
.zd-canvas-wrap { overflow: auto; background: var(--p-canvas, #e9ecef); padding: 1rem; outline: none; position: relative; }
.zd-canvas-wrap:focus-visible { box-shadow: inset 0 0 0 2px var(--p-accent, #2f6feb); }
.zd-canvas { margin: 0 auto; background: repeating-linear-gradient(45deg, #f4f5f7, #f4f5f7 4px, #eceef1 4px, #eceef1 8px); box-shadow: 0 1px 6px rgba(0, 0, 0, .25); user-select: none; color: #000; box-sizing: content-box; }
.zd-sheet { background: #fff; outline: 1px dashed #c9ced6; }
.zd-guide { position: absolute; z-index: 7; pointer-events: none; background: #e5399b; }
.zd-guide--v { top: -2px; bottom: -2px; width: 1px; }
.zd-guide--h { left: -2px; right: -2px; height: 1px; }
.zd-ruler { display: block; color: #8a94a6; font: 9px sans-serif; background: #f6f7f9; border-bottom: 1px solid #d9dee6; }
.zd-ruler text { fill: #667085; }
.zd-band { position: relative; }
.zd-band__title { display: flex; align-items: center; gap: .5rem; height: 18px; font: 11px/18px sans-serif; color: #fff; background: #7b8794; cursor: pointer; padding-inline-end: 6px; white-space: nowrap; overflow: hidden; }
.zd-band__title--sel { box-shadow: inset 0 0 0 2px #ffcf33; }
.zd-band__kind { font-weight: 600; }
.zd-band__name { opacity: .8; }
.zd-band__src { opacity: .9; background: rgba(255, 255, 255, .2); padding: 0 .35rem; border-radius: 3px; direction: ltr; }
.zd-band--reporttitle .zd-band__title, .zd-band--reportsummary .zd-band__title { background: #6b5b95; }
.zd-band--pageheader .zd-band__title, .zd-band--pagefooter .zd-band__title { background: #4a6fa5; }
.zd-band--header .zd-band__title, .zd-band--footer .zd-band__title { background: #2e8b8b; }
.zd-band--groupheader .zd-band__title, .zd-band--groupfooter .zd-band__title { background: #c07a2c; }
.zd-band--data .zd-band__title { background: #3c8d40; }
.zd-band--child .zd-band__title, .zd-band--empty .zd-band__title, .zd-band--static .zd-band__title, .zd-band--overlay .zd-band__title { background: #8a8f98; }
.zd-band__body { position: relative; overflow: visible; min-height: 1px; border-bottom: 1px dashed #c9ced6; }
.zd-band__body--grid { background-image: radial-gradient(circle, #c9ced6 .6px, transparent .7px); background-position: 0 0; }
.zd-body--target { outline: 2px dashed var(--p-accent, #2f6feb); outline-offset: -2px; background-color: rgba(47, 111, 235, .06); }
.zd-band__resize { position: absolute; inset-inline: 0; bottom: -3px; height: 6px; cursor: ns-resize; z-index: 3; touch-action: none; }
.zd-band__resize:hover { background: rgba(47, 111, 235, .35); }
.zd-comp { position: absolute; box-sizing: border-box; cursor: move; touch-action: none; outline: 1px dotted rgba(102, 112, 133, .55); overflow: visible; }
.zd-comp > svg { display: block; width: 100%; height: 100%; pointer-events: none; }
.zd-comp--sel { outline: 1px solid var(--p-accent, #2f6feb); background-color: rgba(47, 111, 235, .05); z-index: 2; }
.zd-comp--primary { outline-width: 2px; }
.zd-comp--dragging { opacity: .75; z-index: 5; pointer-events: none; }
.zd-comp--inner { pointer-events: none; outline: none; }
.zd-text { display: flex; flex-direction: column; width: 100%; height: 100%; overflow: hidden; line-height: 1.25; pointer-events: none; }
.zd-text > span { unicode-bidi: plaintext; white-space: pre-wrap; }
.zd-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font: 11px sans-serif; color: #667085; background: repeating-linear-gradient(45deg, #f6f7f9, #f6f7f9 6px, #eef0f3 6px, #eef0f3 12px); overflow: hidden; pointer-events: none; }
.zd-ph span { direction: ltr; padding: 0 .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zd-barcode { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; overflow: hidden; pointer-events: none; font: 9px monospace; }
.zd-barcode svg { flex: 1; width: 100%; min-height: 0; }
.zd-barcode em { position: absolute; inset-inline-end: 2px; top: 1px; font-style: normal; font-size: 8px; color: #98a2b3; }
.zd-table { width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.zd-table__row { display: flex; border-bottom: 1px solid #c9ced6; }
.zd-table__row > div { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 2px; border-inline-end: 1px solid #e3e7ec; display: flex; align-items: center; }
.zd-table__head { background: #eef2f7; font-weight: 600; }
.zd-table__foot { background: #f6f7f9; font-style: italic; }
.zd-panel { position: relative; width: 100%; height: 100%; pointer-events: none; }
.zd-crossline { position: absolute; inset-block: 0; inset-inline-start: 0; }
.zd-tag { position: absolute; top: -12px; inset-inline-start: 2px; font: 9px sans-serif; color: #667085; white-space: nowrap; }
.zd-handle { position: absolute; width: 7px; height: 7px; background: #fff; border: 1px solid var(--p-accent, #2f6feb); z-index: 4; touch-action: none; }
.zd-handle--nw { left: -4px; top: -4px; cursor: nwse-resize; }
.zd-handle--n { left: calc(50% - 4px); top: -4px; cursor: ns-resize; }
.zd-handle--ne { right: -4px; top: -4px; cursor: nesw-resize; }
.zd-handle--e { right: -4px; top: calc(50% - 4px); cursor: ew-resize; }
.zd-handle--se { right: -4px; bottom: -4px; cursor: nwse-resize; }
.zd-handle--s { left: calc(50% - 4px); bottom: -4px; cursor: ns-resize; }
.zd-handle--sw { left: -4px; bottom: -4px; cursor: nesw-resize; }
.zd-handle--w { left: -4px; top: calc(50% - 4px); cursor: ew-resize; }
.zd-marquee { position: absolute; border: 1px dashed var(--p-accent, #2f6feb); background: rgba(47, 111, 235, .08); pointer-events: none; z-index: 6; }
.zd-ghost { position: fixed; z-index: 10000; pointer-events: none; padding: .2rem .5rem; border-radius: 4px; background: var(--p-accent, #2f6feb); color: #fff; font: 12px sans-serif; opacity: .9; }
.zd-props__kind { margin: .3rem .2rem .5rem; }
.zd-props .zd-toolbox__title { text-transform: none; }
.zd-props__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-bottom: .5rem; }
.zd-props__grid label, .zd-props__row { display: flex; flex-direction: column; gap: .15rem; font-size: .9em; color: var(--p-muted, #667085); }
.zd-props__row { margin-bottom: .5rem; }
.zd-props__row textarea { resize: vertical; font-family: inherit; }
.zd-props__hint { color: var(--p-muted, #667085); font-size: .9em; margin: .4rem .2rem; line-height: 1.6; }
.zd-status { display: flex; align-items: center; gap: .75rem; padding: .2rem .6rem; font-size: .8em; color: var(--p-muted, #667085); border-block-start: 1px solid var(--p-border, #d9dee6); background: var(--p-surface, #fff); min-height: 1.6rem; }
.zd-status__live { direction: ltr; font-variant-numeric: tabular-nums; }
.zd-status__keys { margin-inline-start: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 64rem) { .zd-main { grid-template-columns: 10rem 1fr; } .zd-props { display: none; } }
.zd-bar__tabs { display: inline-flex; border: 1px solid var(--p-border, #d9dee6); border-radius: 6px; overflow: hidden; }
.zd-bar__tab { border: 0; background: none; padding: .2rem .7rem; font: inherit; font-size: .85em; cursor: pointer; color: inherit; }
.zd-bar__tab + .zd-bar__tab { border-inline-start: 1px solid var(--p-border, #d9dee6); }
.zd-bar__tab--on { background: var(--p-accent, #2f6feb); color: #fff; }
.zd-bar__ver { font-size: .8em; color: var(--p-muted, #667085); }
.zd-toolbox__tabs { display: flex; margin-bottom: .4rem; }
.zd-toolbox__tabs .zd-bar__tab { flex: 1; }
.zd-preview { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.zd-props__actions { margin: .6rem .2rem; }
.zd-grid { display: flex; flex-direction: column; gap: 1px; }
.zd-grid__filter { margin-bottom: .4rem; width: 100%; box-sizing: border-box; }
.zd-grid__target { margin: .6rem .1rem .2rem; font-weight: 700; border-bottom: 2px solid var(--p-accent, #2f6feb); padding-bottom: .15rem; }
.zd-grid__cat { margin-top: .35rem; padding: .2rem .3rem; background: var(--p-hover, #eef2f7); border-radius: 4px; font-weight: 600; font-size: .9em; cursor: pointer; user-select: none; }
.zd-grid__row { display: grid; grid-template-columns: 42% 1fr; align-items: center; gap: .3rem; padding: .12rem .2rem; border-bottom: 1px solid var(--p-border-soft, #eef0f3); }
.zd-grid__row--wide { grid-template-columns: 1fr; }
.zd-grid__label { font-size: .88em; color: var(--p-text, #344054); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zd-grid__row--wide .zd-grid__label { white-space: normal; }
.zd-grid__editor { min-width: 0; }
.zd-grid__editor .p-input, .zd-grid__editor select, .zd-grid__editor textarea { width: 100%; box-sizing: border-box; padding: .15rem .3rem; font-size: .9em; }
.zd-grid__editor textarea { resize: vertical; font-family: inherit; }
.zd-grid__code { font-family: ui-monospace, Consolas, monospace !important; direction: ltr; text-align: left; }
.zd-grid__inline { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.zd-grid__inline > .p-input, .zd-grid__inline > select { flex: 1; min-width: 3.5rem; width: auto; }
.zd-grid__inline input[type=color] { width: 2rem; height: 1.6rem; padding: 0; border: 1px solid var(--p-border, #d9dee6); background: none; }
.zd-grid__hex { max-width: 6.5rem; font-family: ui-monospace, Consolas, monospace; }
.zd-grid__quad { display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; align-items: end; }
.zd-grid__mini { display: flex; flex-direction: column; gap: .1rem; font-size: .8em; color: var(--p-muted, #667085); min-width: 0; }
.zd-grid__num { direction: ltr; text-align: center; }
.zd-grid__font, .zd-grid__border { display: flex; flex-direction: column; gap: .25rem; }
.zd-grid__font { display: grid; grid-template-columns: 1fr 4rem; }
.zd-grid__font .zd-grid__toggles { grid-column: 1 / -1; }
.zd-grid__toggles { display: flex; gap: .2rem; flex-wrap: wrap; align-items: center; }
.zd-grid__toggle { min-width: 1.7rem; height: 1.6rem; padding: 0 .35rem; border: 1px solid var(--p-border, #d9dee6); border-radius: 4px; background: var(--p-surface, #fff); cursor: pointer; font: inherit; font-size: .82em; color: inherit; }
.zd-grid__toggle--on { background: var(--p-accent, #2f6feb); border-color: var(--p-accent, #2f6feb); color: #fff; }
.zd-grid__toggle:disabled { opacity: .4; cursor: default; }
.zd-grid__clear { width: 1.6rem; height: 1.6rem; border: 1px solid transparent; border-radius: 4px; background: none; cursor: pointer; color: var(--p-danger, #d92d20); font-size: 1rem; line-height: 1; }
.zd-grid__clear:hover { border-color: var(--p-border, #d9dee6); }
.zd-grid__expr { display: flex; gap: .25rem; align-items: flex-start; }
.zd-grid__check { width: 1.8rem; height: 1.8rem; border: 1px solid var(--p-border, #d9dee6); border-radius: 4px; background: var(--p-surface, #fff); cursor: pointer; color: var(--p-success, #12b76a); }
.zd-grid__msg { font-size: .8em; padding: .15rem .3rem; border-radius: 4px; margin-top: .15rem; }
.zd-grid__msg--ok { color: var(--p-success, #067647); background: rgba(18, 183, 106, .08); }
.zd-grid__msg--err { color: var(--p-danger, #b42318); background: rgba(217, 45, 32, .08); }
.zd-cols { margin-top: .4rem; }
.zd-cols__item { border: 1px solid var(--p-border, #d9dee6); border-radius: 6px; padding: .3rem; margin: .3rem 0; display: flex; flex-direction: column; gap: .25rem; }
.zd-cols__head { display: flex; gap: .25rem; align-items: center; }
.zd-cols__head .p-input { flex: 1; min-width: 0; }
.zd-cols__item .p-input, .zd-cols__item select { padding: .12rem .3rem; font-size: .88em; box-sizing: border-box; width: 100%; }
.zd-cols__wide { flex: 1; }
.zd-cols__check { flex-direction: row; align-items: center; gap: .25rem; white-space: nowrap; }
.zd-dict { display: flex; flex-direction: column; font-size: .88em; }
.zd-dict__root { margin: .5rem .1rem .2rem; font-weight: 700; font-size: .9em; color: var(--p-muted, #667085); }
.zd-dict__tree, .zd-dict__tree ul { list-style: none; margin: 0; padding: 0; }
.zd-dict__item { display: flex; align-items: center; gap: .3rem; padding-block: .12rem; border-radius: 4px; white-space: nowrap; }
.zd-dict__leaf { cursor: grab; touch-action: none; }
.zd-dict__leaf:hover { background: var(--p-hover, #eef2f7); }
.zd-dict__twisty { width: 1.1rem; border: 0; background: none; cursor: pointer; padding: 0; color: var(--p-muted, #667085); }
.zd-dict__glyph { width: 1.2rem; text-align: center; font-size: .78em; color: var(--p-accent, #2f6feb); flex: none; }
.zd-dict__title { overflow: hidden; text-overflow: ellipsis; }
.zd-dict__add { margin-inline-start: auto; min-width: 1.3rem; height: 1.3rem; }
.zd-grid__more { font-weight: 700; color: var(--p-accent, #2f6feb); }
/* ویرایشگر عبارت */
.p-backdrop .zx-modal { width: min(64rem, 94vw); max-width: 94vw; }
.zx { display: flex; flex-direction: column; gap: .4rem; }
.zx__mode { font-size: .85em; color: var(--p-muted, #667085); }
.zx__text { width: 100%; box-sizing: border-box; font-size: 1rem; line-height: 1.6; resize: vertical; }
.zx__ops { display: flex; flex-wrap: wrap; gap: .25rem; }
.zx__op { font-family: ui-monospace, Consolas, monospace; direction: ltr; min-width: 2.1rem; }
.zx__cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: .8rem; min-height: 18rem; max-height: 46vh; }
.zx__col { overflow: auto; border: 1px solid var(--p-border, #d9dee6); border-radius: 6px; padding: .3rem .4rem; }
.zx__cats { flex-wrap: wrap; margin-bottom: .3rem; }
.zx__fns { list-style: none; margin: 0; padding: 0; font-size: .88em; }
.zx__fn { display: flex; gap: .5rem; align-items: baseline; padding: .15rem .3rem; border-radius: 4px; cursor: pointer; }
.zx__fn:hover { background: var(--p-hover, #eef2f7); }
.zx__fn--on { background: rgba(47, 111, 235, .12); }
.zx__fn code { min-width: 7.5rem; color: var(--p-accent, #2f6feb); }
.zx__fn span { color: var(--p-muted, #667085); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zx__doc { margin-top: .4rem; padding: .4rem; border-top: 1px solid var(--p-border, #d9dee6); display: flex; flex-direction: column; gap: .25rem; font-size: .88em; }
.zx__sig { font-weight: 700; }
.zx__example code { background: var(--p-hover, #eef2f7); padding: 0 .3rem; border-radius: 3px; }
.zd-dict__leaf--click { cursor: pointer; }
/* ویرایشگر سبک‌ها و پارامترها */
.zs { display: grid; grid-template-columns: 15rem 1fr; gap: .8rem; min-height: 22rem; max-height: 62vh; }
.zs__list, .zs__props { overflow: auto; }
.zs__list ul { list-style: none; margin: 0 0 .4rem; padding: 0; }
.zs__item { display: flex; align-items: center; gap: .45rem; padding: .25rem .35rem; border-radius: 5px; cursor: pointer; }
.zs__item:hover { background: var(--p-hover, #eef2f7); }
.zs__item--on { background: rgba(47, 111, 235, .12); }
.zs__swatch { width: 2rem; height: 1.4rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; font-size: .78em; background: var(--p-hover, #eef2f7); flex: none; }
.zs__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zs__count { font-size: .78em; color: var(--p-muted, #667085); }
@media (max-width: 48rem) { .zx__cols, .zs { grid-template-columns: 1fr; } }
/* جادو، ساختار، مرتب‌سازی */
.zw { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-height: 64vh; overflow: auto; }
.zw__col { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.zw__list { display: flex; flex-direction: column; gap: .15rem; max-height: 16rem; overflow: auto; border: 1px solid var(--p-border, #d9dee6); border-radius: 6px; padding: .3rem .4rem; }
.zw__list code { font-size: .78em; color: var(--p-muted, #667085); }
.zw__colrow { display: flex; justify-content: space-between; gap: .4rem; align-items: center; }
.zw__total { font-size: .85em; color: var(--p-accent, #2f6feb); }
.zd-outline__band { font-weight: 600; cursor: pointer; }
.zd-outline .zd-dict__item { cursor: pointer; }
.zd-outline .zd-dict__item:hover { background: var(--p-hover, #eef2f7); }
.zd-outline__dot { width: .6rem; height: .6rem; border-radius: 2px; background: #7b8794; flex: none; }
.zd-outline__dot.zd-band--reporttitle, .zd-outline__dot.zd-band--reportsummary { background: #6b5b95; }
.zd-outline__dot.zd-band--pageheader, .zd-outline__dot.zd-band--pagefooter { background: #4a6fa5; }
.zd-outline__dot.zd-band--header, .zd-outline__dot.zd-band--footer { background: #2e8b8b; }
.zd-outline__dot.zd-band--groupheader, .zd-outline__dot.zd-band--groupfooter { background: #c07a2c; }
.zd-outline__dot.zd-band--data { background: #3c8d40; }
.zd-outline__sum { max-width: 7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-inline-start: auto; }
.zd-sort { margin: .2rem 0; }
.zd-sort .p-input { padding: .12rem .3rem; font-size: .88em; }
.zd-sort select { max-width: 6.5rem; }
@media (max-width: 48rem) { .zw { grid-template-columns: 1fr; } }
/* ورود و مدیریت قالب */
.zd-bar__file { position: relative; display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; }
.zd-bar__fileinput { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.zi { display: flex; flex-direction: column; gap: .5rem; max-height: 64vh; }
.zi__summary { display: flex; flex-direction: column; gap: .2rem; }
.zi__list { list-style: none; margin: 0; padding: 0; overflow: auto; max-height: 44vh; border: 1px solid var(--p-border, #d9dee6); border-radius: 6px; }
.zi__item { display: grid; grid-template-columns: 5rem 1fr; gap: .1rem .5rem; padding: .3rem .5rem; border-bottom: 1px solid var(--p-border-soft, #eef0f3); font-size: .88em; }
.zi__sev { font-weight: 700; font-size: .85em; }
.zi__item--error .zi__sev { color: var(--p-danger, #b42318); }
.zi__item--warning .zi__sev { color: #b54708; }
.zi__item--info .zi__sev { color: var(--p-muted, #667085); }
.zi__path { grid-column: 2; font-size: .8em; color: var(--p-muted, #667085); }
.zt { width: 100%; border-collapse: collapse; font-size: .9em; }
.zt th, .zt td { padding: .35rem .4rem; border-bottom: 1px solid var(--p-border-soft, #eef0f3); text-align: start; vertical-align: middle; }
.zt th { font-weight: 600; color: var(--p-muted, #667085); font-size: .85em; }
.zt__row--default td:first-child { font-weight: 700; }
.zt__actions { display: flex; gap: .25rem; justify-content: flex-end; }
.zt__history ul { list-style: none; margin: 0; padding: 0 1rem; display: flex; flex-direction: column; gap: .25rem; }
.zt__history li { display: flex; gap: .6rem; align-items: center; font-size: .9em; }
.zr-viewer__designer { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.zr-viewer__designer > .zd { flex: 1; }
.zr-viewer__bar[hidden], .zr-viewer__scroll[hidden] { display: none; }
/* فرم زمینه در بوم و بارگذاری تصویر */
.zd-band__bg { position: absolute; inset: 0; pointer-events: none; background-repeat: no-repeat; z-index: 0; }
.zd-grid__upload { position: relative; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.zd-grid__upload--busy { opacity: .5; pointer-events: none; }
/* تنظیم چاپ روی فرم */
.zc { display: flex; flex-direction: column; gap: .7rem; max-width: 34rem; }
.zc__row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.zc__axis { display: inline-flex; align-items: center; gap: .25rem; }
.zc__axis .p-input { width: 5.5rem; text-align: center; }
.zc__section { border: 1px solid var(--p-border, #d9dee6); border-radius: 8px; padding: .6rem .7rem; display: flex; flex-direction: column; gap: .45rem; }
.zc__title { font-weight: 700; font-size: .92em; }
.zc__pwd { flex: 1 1 12rem; min-width: 0; }
.zc__hint { font-size: .84em; color: var(--p-muted, #667085); line-height: 1.6; }
.zr-viewer__calib { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .45rem .7rem; background: #fff7e0; border-bottom: 1px solid #f0d48a; font-size: .88em; }
@media print { .zr-viewer__calib { display: none; } }
.zi__item--link { cursor: pointer; }
.zi__item--link:hover, .zi__item--link:focus-visible { background: var(--p-hover, #eef2f7); outline: none; }
/* نمودار در بوم طراح */
.zd-chart { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; }
.zd-chart svg { flex: 1; width: 100%; min-height: 0; }
/* تعامل نمایشگر: جست‌وجو، نشانک‌ها، پیوند */
.zr-viewer__main { flex: 1; display: flex; min-height: 0; }
.zr-viewer__main > .zr-viewer__scroll { flex: 1; }
.zr-viewer__page { position: relative; }
.zr-hit { position: absolute; background: rgba(255, 204, 0, .38); border-radius: 2px; pointer-events: none; mix-blend-mode: multiply; }
.zr-hit--current { background: rgba(255, 140, 0, .55); outline: 2px solid rgba(230, 110, 0, .9); }
.zr-viewer__search { display: inline-flex; align-items: center; gap: .2rem; }
.zr-viewer__search .p-input { width: 11rem; }
.zr-viewer__hits { font-size: .82em; color: var(--p-muted, #667085); min-width: 3.5rem; text-align: center; }
.zr-viewer__toc { width: 15rem; overflow: auto; border-inline-end: 1px solid var(--p-border, #d9dee6); background: var(--p-surface, #fff); padding: .4rem; font-size: .88em; }
.zr-viewer__toc button { display: flex; width: 100%; justify-content: space-between; gap: .5rem; border: 0; background: none; padding: .3rem .4rem; border-radius: 4px; text-align: start; cursor: pointer; color: inherit; font: inherit; }
.zr-viewer__toc button:hover, .zr-viewer__toc button:focus-visible { background: var(--p-hover, #eef2f7); outline: none; }
.zr-viewer__toc-title { font-weight: 700; padding: .2rem .4rem .4rem; }
.zr-viewer__toc-page { color: var(--p-muted, #667085); flex-shrink: 0; }
.zr-viewer__page a.zr-link { cursor: pointer; }
.zr-viewer__page a.zr-link:hover * { opacity: .75; }
@media print { .zr-viewer__toc, .zr-hit { display: none; } }

/* مسیر پرش به گزارش دیگر (drill-down) */
.zr-viewer__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .3rem .5rem; border-bottom: 1px solid var(--p-border, #d9dee6); background: var(--p-surface-2, #f6f8fb); font-size: .9em; }
.zr-crumb { background: none; border: 0; padding: .1rem .25rem; color: var(--p-primary, #1d4ed8); cursor: pointer; border-radius: 4px; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zr-crumb:hover:not(:disabled) { text-decoration: underline; }
.zr-crumb--current { color: inherit; font-weight: 700; cursor: default; }
.zr-crumb__sep { color: var(--p-muted, #667085); }
@media print { .zr-viewer__crumbs { display: none; } }

/* ── «ستون‌ها»: چیدمان ستون‌های کاربر ── */
.zcol { display: flex; flex-direction: column; gap: 8px; min-inline-size: min(980px, 92vw); }
.zcol__panes { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; }
.zcol__pane { display: flex; flex-direction: column; gap: 6px; min-block-size: 0; }
.zcol__list, .zcol__fields { display: flex; flex-direction: column; gap: 4px; max-block-size: 56vh; overflow: auto; padding-inline-end: 2px; }
.zcol__item { border: 1px solid var(--p-border, #d0d5dd); border-radius: 6px; padding: 4px 6px; background: var(--p-surface, #fff); }
.zcol__head { display: flex; align-items: center; gap: 4px; }
.zcol__no { min-inline-size: 1.6em; text-align: center; color: var(--p-muted, #667085); }
.zcol__header { flex: 1; min-inline-size: 0; }
.zcol__props { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-block-start: 4px; font-size: .86em; align-items: end; }
.zcol__props label { display: flex; flex-direction: column; gap: 2px; }
.zcol__props select, .zcol__props input { font-size: inherit; }
.zcol__num { inline-size: 5.5em; }
.zcol__check { flex-direction: row !important; align-items: center; gap: 4px !important; }
.zcol__field { display: flex; align-items: center; gap: 6px; text-align: start; border: 1px solid transparent; border-radius: 5px; padding: 4px 6px; background: transparent; cursor: pointer; font: inherit; color: inherit; }
.zcol__field:hover, .zcol__field:focus-visible { border-color: var(--p-border, #d0d5dd); background: var(--p-hover, #f2f4f7); }
.zcol__field > span:first-child { flex: 1; }
.zcol__kind { font-size: .8em; color: var(--p-muted, #667085); }
.zcol__used { color: var(--p-ok, #12b76a); font-weight: 700; }
.zcol__field--used { opacity: .7; }
@media (max-width: 760px) { .zcol__panes { grid-template-columns: 1fr; } }

/* مرکز قالب‌های چاپ */
.ztc { display: flex; flex-direction: column; gap: .5rem; min-height: 0; flex: 1; }
.ztc__bar { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.ztc__search { max-width: 22rem; flex: 1 1 12rem; }
.ztc__group td { background: var(--p-surface-2, #f6f8fb); font-weight: 700; color: var(--p-text, #1d2939); }
.ztc__key { font-size: .8em; color: var(--p-muted, #667085); }
.ztc__designer { min-height: 70vh; }
.zt__confirm { display: flex; gap: .5rem; align-items: center; margin-top: .6rem; padding: .5rem .6rem; border: 1px solid var(--p-danger-soft, #fecdca); border-radius: 6px; background: var(--p-danger-bg, #fef3f2); flex-wrap: wrap; }
