.templates-page { height: calc(100vh - 115px); min-width: 0; min-height: 0; padding: 0; overflow: hidden; color: var(--text); background: var(--bg); } .templates-page *, .templates-page *::before, .templates-page *::after { box-sizing: border-box; } .templates-shell { display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; border: var(--border-line); background: var(--panel); } .templates-sidebar, .templates-workspace { min-width: 0; min-height: 0; } .templates-sidebar { display: flex; flex-direction: column; overflow: hidden; border-right: var(--border-line); background: var(--panel-soft); } .templates-workspace { display: flex; flex-direction: column; overflow: hidden; background: var(--bg); } .templates-sidebar-toolbar, .templates-workspace-toolbar, .templates-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 0 0 auto; border-bottom: var(--border-line); background: var(--panel-header); } .templates-sidebar-toolbar { min-height: 52px; padding: 8px 10px 8px 14px; } .templates-workspace-toolbar { min-height: 58px; padding: 8px 10px 8px 14px; } .templates-toolbar-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; } .templates-toolbar-actions .btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } .templates-current-title { min-width: 0; flex: 1 1 auto; } .templates-current-title strong, .templates-current-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .templates-current-title small { margin-top: 3px; color: var(--muted); font-size: 11px; } .templates-search { padding: 9px; border-bottom: var(--border-line); background: var(--panel); } .templates-search input { width: 100%; min-height: 34px; padding: 7px 9px; } .templates-list { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 6px; } .templates-list > button { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 56px; padding: 8px 9px; border: 0; border-radius: var(--radius-sm); color: var(--text); background: transparent; cursor: pointer; text-align: left; } .templates-list > button:hover, .templates-list > button:focus-visible { background: var(--primary-soft); outline: 0; } .templates-list > button.is-selected { background: var(--primary-soft-strong); box-shadow: inset 3px 0 0 var(--accent); } .templates-list strong, .templates-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .templates-list small { margin-top: 3px; color: var(--muted); font-size: 11px; } .templates-alerts { flex: 0 0 auto; padding: 0 12px; } .templates-alerts:empty { display: none; } .templates-alerts .alert { margin: 10px 0 0; } .templates-workspace > .loading-frame { flex: 1 1 auto; min-height: 0; } .templates-content { height: 100%; min-width: 0; min-height: 0; overflow: auto; padding: 14px; } .templates-empty, .templates-inline-empty { display: grid; place-items: center; min-height: 90px; padding: 16px; color: var(--muted); font-size: 13px; text-align: center; } .templates-definition-fields { display: grid; grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, .7fr)); gap: 12px; margin-bottom: 14px; } .templates-definition-fields .form-field:nth-child(5) { grid-column: span 2; } .templates-definition-fields input, .templates-definition-fields select, .templates-dialog-form input, .templates-dialog-form select, .templates-layout-fields input, .templates-layout-fields select, .templates-preview-controls select { width: 100%; } .templates-section { min-width: 0; margin-bottom: 14px; border: var(--border-line); background: var(--panel); } .templates-section-heading { min-height: 44px; padding: 7px 10px; } .templates-section-heading small { color: var(--muted); font-weight: 400; } .templates-section-heading .btn { display: inline-flex; align-items: center; gap: 6px; } .templates-fields-table { overflow: auto; padding: 8px; } .templates-field-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(110px, .6fr) minmax(160px, 1fr) auto 34px; align-items: center; gap: 8px; min-width: 710px; padding: 4px 0; } .templates-field-row input, .templates-field-row select { width: 100%; } .templates-layout-fields { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 12px; padding: 12px; } .templates-body-section .wysiwyg-editor { margin: 12px; } .templates-preview { max-width: 1100px; margin: 0 auto; } .templates-preview-controls { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(250px, 1.2fr) auto; align-items: end; gap: 14px; padding: 12px; } .templates-sample { display: block; width: calc(100% - 24px); min-height: 260px; margin: 0 12px; padding: 10px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; } .templates-preview-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px; } .templates-preview-actions .btn, .templates-render-result .btn { display: inline-flex; align-items: center; gap: 6px; } .templates-render-result dl { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 10px; margin: 0; padding: 12px; } .templates-render-result dl div { padding: 9px; border: var(--border-line); background: var(--panel-soft); } .templates-render-result dt { color: var(--muted); font-size: 11px; text-transform: uppercase; } .templates-render-result dd { margin: 4px 0 0; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; } .templates-render-result > p { margin: 0; padding: 0 12px 12px; color: var(--muted); } .templates-history-list { max-height: 260px; overflow: auto; padding: 6px; } .templates-history-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 7px 9px; border-bottom: var(--border-line); } .templates-history-list > div:last-child { border-bottom: 0; } .templates-history-list strong, .templates-history-list small { display: block; } .templates-history-list small { margin-top: 3px; color: var(--muted); font-size: 11px; } .templates-history-list .btn { display: inline-flex; align-items: center; gap: 6px; } .templates-history-badges { display: flex; align-items: center; gap: 6px; } .templates-dialog-form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, .7fr); gap: 12px; min-width: min(560px, 80vw); } @media (max-width: 980px) { .templates-shell { grid-template-columns: minmax(210px, 250px) minmax(0, 1fr); } .templates-definition-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .templates-definition-fields .form-field:nth-child(5) { grid-column: auto; } .templates-layout-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .templates-preview-controls { grid-template-columns: 1fr; align-items: stretch; } .templates-render-result dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } } @media (max-width: 720px) { .templates-page { height: auto; min-height: calc(100vh - 100px); overflow: visible; } .templates-shell { display: flex; flex-direction: column; height: auto; overflow: visible; } .templates-sidebar { max-height: 280px; border-right: 0; border-bottom: var(--border-line); } .templates-workspace { overflow: visible; } .templates-workspace-toolbar { align-items: flex-start; flex-wrap: wrap; } .templates-toolbar-actions { flex-wrap: wrap; } .templates-content { height: auto; overflow: visible; } .templates-definition-fields, .templates-dialog-form, .templates-render-result dl { grid-template-columns: 1fr; } }