.dsl-editor {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 20px;
}

.dsl-editor__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}

.dsl-editor__subtitle {
	color: #666;
	margin-top: 4px;
}

.dsl-editor__topbar .panel__body {
	padding: 16px;
}

.dsl-editor__main {
	display: grid;
	grid-template-columns: 320px 1fr 280px;
	gap: 16px;
	min-height: 520px;
}

.panel {
	border: 1px solid #dcdcdc;
	border-radius: 8px;
	background: #fff;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.panel__header {
	padding: 12px 16px;
	border-bottom: 1px solid #ececec;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.step-tree {
	list-style: none;
	margin: 0;
	padding: 8px;
}

.step-tree__item + .step-tree__item {
	margin-top: 6px;
}

.step-tree__link {
	display: block;
	padding: 10px 12px;
	text-decoration: none;
	color: #222;
	border-radius: 6px;
	background: #f7f7f7;
}

.step-tree__link:hover {
	background: #efefef;
}

.step-tree__link.is-active {
	background: #dfeeff;
	border: 1px solid #9ec5ff;
}

.step-tree__desc {
	font-size: 12px;
	color: #666;
	margin-top: 4px;
}

.step-detail {
	padding: 16px;
}

.step-detail__title {
	font-weight: 700;
	font-size: 20px;
	margin-bottom: 10px;
}

.step-detail__meta {
	display: flex;
	gap: 24px;
	margin-bottom: 16px;
	color: #555;
}

.help-block {
	padding: 16px;
	border-bottom: 1px solid #eee;
}

.help-block__title {
	font-weight: 700;
	margin-bottom: 8px;
}

.help-block ul {
	margin: 0;
	padding-left: 18px;
}

.help-list {
	margin: 0;
	padding-left: 18px;
}

.help-list li + li {
	margin-top: 6px;
}

.help-list__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: help;
}

.help-list__hint {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 999px;
	background: #e9eef6;
	color: #4b5563;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.json-preview {
	margin: 0;
	padding: 16px;
	overflow: auto;
	background: #fafafa;
	font-size: 13px;
	line-height: 1.5;
	border: 1px solid #eee;
	border-radius: 6px;
}

.json-preview--inner {
	margin-top: 0;
	padding: 12px;
}

.empty-state {
	color: #777;
	padding: 24px 0;
}

code {
	background: #f3f3f3;
	padding: 2px 6px;
	border-radius: 4px;
}

.view-switch {
	display: flex;
	gap: 8px;
}

.view-switch__link {
	display: inline-block;
	padding: 6px 10px;
	border-radius: 6px;
	text-decoration: none;
	color: #222;
	background: #f3f3f3;
	border: 1px solid #ddd;
}

.step-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
	align-items: stretch;
}

.step-form__label {
	font-weight: 700;
	color: #555;
}

.step-form__row {
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	padding: 10px 16px 10px 0;
	border-bottom: 1px solid #eee;
}

.step-form__value {
	min-width: 0;
	width: 100%;
	justify-self: stretch;
	padding-right: 16px;
	box-sizing: border-box;
}

.step-form__input,
.step-form__textarea,
.step-form select,
.step-form input[type="text"] {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: none;
	box-sizing: border-box;
	padding: 8px 10px;
}

.step-form__value > .step-form__input,
.step-form__value > .step-form__textarea,
.step-form__value > select {
	display: block;
	width: 100% !important;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
}

.step-form__textarea {
	min-height: 140px;
	resize: vertical;
	font-family: monospace;
}

.step-form__actions {
	display: flex;
	justify-content: flex-end;
	padding-top: 8px;
}

.step-form__button {
	padding: 8px 12px;
	border: 1px solid #d0d7de;
	border-radius: 6px;
	background: #f3f3f3;
	cursor: pointer;
}

.step-form__button:hover {
	background: #ebebeb;
}

.step-form__hint {
	margin-top: 6px;
	font-size: 13px;
	color: #666;
}

.cond-list {
	margin: 0;
	padding-left: 18px;
}

.cond-list li {
	margin-bottom: 4px;
}

.nested-step-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nested-step-list__item {
	list-style: none;
}

.nested-step-list__link {
	display: block;
	padding: 8px 10px;
	background: #f7f7f7;
	border-radius: 6px;
	border: 1px solid #ececec;
	text-decoration: none;
	color: #222;
}

.nested-step-list__link:hover {
	opacity: 0.85;
}

.step-breadcrumbs {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
	padding: 10px 12px;
	background: #f8f9fb;
	border: 1px solid #eceff3;
	border-radius: 8px;
}

.step-breadcrumbs__path {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	font-size: 14px;
}

.step-breadcrumbs__path a {
	color: #0b5ed7;
	text-decoration: none;
}

.step-breadcrumbs__path a:hover {
	text-decoration: underline;
}

.step-breadcrumbs__sep {
	color: #999;
}

.step-breadcrumbs__up-link {
	display: inline-block;
	padding: 6px 10px;
	border-radius: 6px;
	text-decoration: none;
	color: #222;
	background: #f3f3f3;
	border: 1px solid #ddd;
	white-space: nowrap;
}

.step-breadcrumbs__up-link:hover {
	background: #ebebeb;
}

.step-delete-form {
	margin-bottom: 16px;
	display: flex;
	justify-content: flex-end;
}

.step-delete-form__button {
	padding: 8px 12px;
	border: 1px solid #dc3545;
	border-radius: 6px;
	background: #fff5f5;
	color: #b42318;
	cursor: pointer;
}

.step-delete-form__button:hover {
	background: #ffe3e3;
}

.step-add-form {
	width: 100%;
	margin-bottom: 16px;
	padding: 12px;
	border: 1px solid #eceff3;
	border-radius: 8px;
	background: #f8f9fb;
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: stretch;
}

.step-add-form__inner {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	align-items: stretch;
}

.step-add-form__actions--stacked {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	align-items: stretch;
}

.step-add-form .step-form__input,
.step-add-form .step-form__button,
.step-add-form select,
.step-add-form button {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.command-meta-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	align-items: stretch;
}

.command-meta-form .step-form {
	width: 100%;
	align-items: stretch;
}

.panel-summary {
	cursor: pointer;
	list-style: none;
}

.panel-summary::-webkit-details-marker {
	display: none;
}

.panel-summary::after {
	content: "+";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border: 1px solid #d0d7de;
	border-radius: 6px;
	background: #f3f3f3;
	font-weight: 700;
}

.panel[open] .panel-summary::after {
	content: "-";
}

.command-run-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.command-run-hints {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.command-run-hint {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #f8f9fb;
	font-size: 12px;
	color: #555;
}

.command-run-result {
	margin: 16px;
	padding: 12px;
	border: 1px solid #d0d7de;
	border-radius: 8px;
	background: #fafafa;
}

.command-run-result.is-success {
	border-color: #b7dfc2;
	background: #f6fff8;
}

.command-run-result.is-error {
	border-color: #f0b8b8;
	background: #fff8f8;
}

.command-run-result__title {
	font-weight: 700;
	margin-bottom: 8px;
}

.editor-topbar-forms {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	align-items: start;
}

.editor-topbar-form {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

.editor-topbar-form .step-form__input,
.editor-topbar-form select,
.editor-topbar-form input[type="text"] {
	flex: 1;
	min-width: 0;
	padding: 8px 10px;
}

.editor-topbar-form input[type="submit"],
.editor-topbar-form button {
	padding: 8px 12px;
	cursor: pointer;
}

.gui-shell {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 24px;
	align-items: start;
}

.gui-shell__sidebar {
	border-right: 1px solid #e5e7eb;
	padding-right: 16px;
}

.gui-shell__title {
	font-weight: 700;
	margin-bottom: 16px;
}

.gui-shell__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.gui-shell__menu-link {
	display: block;
	padding: 8px 12px;
	border-radius: 8px;
	text-decoration: none;
	color: #1f2937;
	background: #f3f4f6;
}

.gui-shell__menu-link:hover {
	background: #e5e7eb;
}

.gui-shell__menu-link.is-active {
	background: #dbeafe;
	color: #1d4ed8;
	font-weight: 600;
}

.gui-shell__content {
	min-width: 0;
}

@media (max-width: 1200px) {
	.dsl-editor__main {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 900px) {
	.editor-topbar-forms {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 700px) {
	.gui-shell {
		grid-template-columns: 1fr;
	}

	.gui-shell__sidebar {
		border-right: 0;
		border-bottom: 1px solid #e5e7eb;
		padding-right: 0;
		padding-bottom: 12px;
	}

	.gui-shell__menu {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.step-form__row {
		grid-template-columns: 1fr;
	}
}

.step-add-form,
.step-add-form__inner,
.step-add-form__actions--stacked {
	min-width: 0;
}

.step-add-form select,
.step-add-form .step-form__input,
.step-add-form .step-form__button,
.step-add-form button {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.panel,
.panel__body,
.step-form,
.step-form__value,
.command-meta-form {
	min-width: 0;
}

.ticket-page {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ticket-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}

.ticket-header__count {
	color: #666;
	white-space: nowrap;
}

.ticket-toolbar {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.ticket-filter-link {
	display: inline-block;
	padding: 8px 12px;
	border-radius: 8px;
	text-decoration: none;
	color: #1f2937;
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
}

.ticket-filter-link:hover {
	background: #e5e7eb;
}

.ticket-filter-link.is-active {
	background: #dbeafe;
	color: #1d4ed8;
	font-weight: 600;
	border-color: #bfdbfe;
}

.ticket-table-wrap {
	overflow-x: auto;
}

.ticket-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
}

.ticket-table th,
.ticket-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #ececec;
	text-align: left;
	vertical-align: middle;
}

.ticket-table th {
	background: #f8f9fb;
	font-weight: 700;
}

.ticket-table tbody tr:hover {
	background: #fafcff;
}

.ticket-table__type,
.ticket-table th.ticket-table__type {
	width: 100px;
	text-align: center;
}

.ticket-table__created,
.ticket-table th.ticket-table__created {
	width: 170px;
	white-space: nowrap;
}

.ticket-muted {
	color: #777;
}

.ticket-empty {
	text-align: center;
	color: #777;
	padding: 24px 12px;
}

.ticket-badge {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
}

.ticket-badge--call {
	background: #dbeafe;
	color: #1d4ed8;
}

.ticket-badge--chat {
	background: #dcfce7;
	color: #166534;
}

.ticket-badge--muted {
	background: #f3f4f6;
	color: #6b7280;
}

.ticket-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.ticket-pagination__link,
.ticket-pagination__current,
.ticket-pagination__disabled {
	display: inline-block;
	padding: 8px 12px;
	border-radius: 8px;
	border: 1px solid #ddd;
	text-decoration: none;
}

.ticket-pagination__link {
	color: #222;
	background: #f3f3f3;
}

.ticket-pagination__link:hover {
	background: #ebebeb;
}

.ticket-pagination__current {
	background: #dbeafe;
	color: #1d4ed8;
	border-color: #bfdbfe;
	font-weight: 700;
}

.ticket-pagination__disabled {
	color: #999;
	background: #f9f9f9;
	border-color: #eee;
}

@media (max-width: 700px) {
	.ticket-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

.ticket-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.ticket-toolbar__left {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.ticket-toolbar__right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ticket-toolbar select {
	padding: 6px 8px;
	border-radius: 6px;
	border: 1px solid #ddd;
	background: #fff;
	cursor: pointer;
}

.login-page {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5f7fb;
}

.login-card {
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	padding: 32px;
}

.login-title {
	margin: 0 0 10px;
	font-size: 28px;
	font-weight: 700;
}

.login-text {
	margin: 0 0 24px;
	color: #4b5563;
}

.google-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 12px 16px;
	border-radius: 10px;
	background: #111827;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
}

.flash {
	padding: 10px 12px;
	border-radius: 10px;
	margin-bottom: 16px;
}

.flash.success {
	background: #dcfce7;
	color: #166534;
	border: 1px solid #86efac;
}

.flash.error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}
.planner-delete-link {
	display: inline-block;
	padding: 6px 10px;
	border-radius: 6px;
	text-decoration: none;
	color: #991b1b;
	background: #fee2e2;
	border: 1px solid #fca5a5;
}

.planner-delete-link:hover {
	background: #fecaca;
}

.planner-delete-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 6px;
	text-decoration: none;
	background: #fee2e2;
	border: 1px solid #fca5a5;
	cursor: pointer;
}

.planner-delete-icon svg {
	color: #b91c1c;
	stroke: #b91c1c;
}

.planner-delete-icon:hover {
	background: #fecaca;
}

.planner-delete-icon:hover svg {
	color: #7f1d1d;
	stroke: #7f1d1d;
}

.gui-firm-select {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	box-sizing: border-box;
}

.gui-topbar {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 20px;
}

.gui-topbar__user {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: nowrap;
	justify-content: flex-end;
}

.gui-topbar__user-meta {
	text-align: right;
}

.gui-topbar__user-name {
	font-weight: 700;
	color: #111827;
}

.gui-topbar__user-login {
	font-size: 14px;
	color: #6b7280;
}

.gui-topbar__logout {
	display: inline-block;
	padding: 8px 12px;
	border-radius: 8px;
	text-decoration: none;
	color: #1f2937;
	background: #f3f4f6;
}

.gui-topbar__logout:hover {
	background: #e5e7eb;
}

.gui-firm-select {
	padding: 8px 10px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	box-sizing: border-box;
	min-width: 180px;
}

@media (max-width: 700px) {
	.gui-topbar {
		flex-direction: column;
		align-items: stretch;
	}

	.gui-topbar__user {
		margin-left: 0;
		justify-content: flex-start;
	}

	.gui-topbar__user-meta {
		text-align: left;
	}
}

.event-config-layout {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 24px;
	align-items: start;
}

.event-tree,
.event-detail {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 16px;
}

.event-tree-root,
.event-tree ul {
	list-style: none;
	padding-left: 18px;
	margin: 8px 0;
}

.event-tree li {
	margin: 6px 0;
}

.event-tree-group {
	margin: 0;
}

.event-tree-summary {
	cursor: pointer;
	list-style: none;
}

.event-tree-summary::-webkit-details-marker {
	display: none;
}

.event-tree-summary::before {
	content: "▸";
	display: inline-block;
	width: 14px;
	margin-right: 4px;
	transition: transform 0.15s ease;
}

.event-tree-group[open] > .event-tree-summary::before {
	transform: rotate(90deg);
}

.event-tree-link {
	text-decoration: none;
	color: inherit;
}

.event-tree-link.is-active {
	font-weight: bold;
}

.event-meta {
	margin-bottom: 16px;
	padding: 12px;
	background: #f8f8f8;
	border-radius: 6px;
}

.event-meta table {
	width: 100%;
	border-collapse: collapse;
}

.event-meta td {
	padding: 4px 8px;
	vertical-align: top;
}

.event-note {
	margin-top: 10px;
	color: #666;
	font-size: 0.95em;
}

.event-tree-create {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid #ddd;
}

.event-tree-create-block + .event-tree-create-block {
	margin-top: 16px;
}

.event-tree-create-block h5 {
	margin: 0 0 8px 0;
	font-size: 14px;
}

.event-tree-create-hint {
	margin: 0 0 8px 0;
	color: #666;
	font-size: 13px;
}

.event-message-catalog {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid #ddd;
}

.event-message-catalog-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

.event-message-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.event-message-table th,
.event-message-table td {
	border: 1px solid #ddd;
	padding: 6px 8px;
	vertical-align: top;
	text-align: left;
}

.event-message-table code {
	white-space: nowrap;
}

.event-message-editor {
	margin-top: 16px;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fafafa;
}

.event-message-editor-row {
	display: grid;
	grid-template-columns: 220px 1fr 44px;
	gap: 12px;
	align-items: start;
	margin-bottom: 12px;
}

.event-message-editor-row:last-child {
	margin-bottom: 0;
}

.event-message-editor-name {
	font-weight: 600;
	padding-top: 8px;
	word-break: break-word;
}

.event-message-editor-name input[type="hidden"] {
	display: none;
}

.event-message-editor-text input[type="text"],
.event-message-editor-add select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #cfcfcf;
	border-radius: 6px;
	background: #fff;
	font: inherit;
}

.event-message-editor-text textarea,
.event-message-editor-add textarea {
	min-height: 88px;
	resize: vertical;
}

.event-message-editor-delete {
	display: flex;
	justify-content: center;
	padding-top: 6px;
}

.event-delete-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	cursor: pointer;
	color: #c62828;
	font-size: 22px;
	line-height: 1;
	border: 1px solid #e0b4b4;
	background: #fff5f5;
}

.event-delete-icon:hover {
	background: #ffe9e9;
}

.event-delete-icon input[type="checkbox"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	margin: 0;
}

.event-delete-icon input[type="checkbox"]:checked + span {
	color: #fff;
	background: #c62828;
	border-radius: 50%;
	width: 100%;
	height: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.event-message-editor-add {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e1e1e1;
}

.event-message-editor-add-title {
	margin-bottom: 8px;
	font-weight: 600;
}

.event-message-editor-actions {
	margin-top: 12px;
}

.event-delete-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	text-decoration: none;
	font-size: 24px;
	line-height: 1;
	color: #c62828;
	background: #fff5f5;
	border: 1px solid #e0b4b4;
}

.event-delete-link:hover {
	background: #ffe9e9;
}

.event-message-editor-add-button {
	display: flex;
	align-items: end;
}

.event-message-editor-add-button input[type="submit"] {
	padding: 8px 14px;
	border: 1px solid #bbb;
	border-radius: 6px;
	background: #f3f3f3;
	cursor: pointer;
}

.event-message-editor-row-add {
	grid-template-columns: 1fr auto;
	align-items: end;
}

.event-message-preview-note {
	margin-top: 8px;
	padding: 10px 12px;
	background: #f8f8f8;
	border: 1px solid #ddd;
	border-radius: 6px;
	color: #555;
	white-space: pre-wrap;
}

.event-form-field {
	margin-bottom: 1rem;
}

.event-form-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.event-form-field input,
.event-form-field select,
.event-form-field textarea {
	width: 100%;
	max-width: 400px;
}
.event-message-editor-table {
	display: table;
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
}

.event-message-editor-row {
	display: table-row;
}

.event-message-editor-name,
.event-message-editor-text,
.event-message-editor-delete {
	display: table-cell;
	vertical-align: top;
	padding: 8px 0;
}

.event-message-editor-name {
	width: 220px;
	padding-right: 16px;
	font-weight: 600;
	word-break: break-word;
}

.event-message-editor-text {
	padding-right: 16px;
	line-height: 1.4;
	word-break: break-word;
}

.event-message-editor-delete {
	width: 40px;
	text-align: center;
}

.event-message-editor-interval {
	display: table-cell;
	width: 120px;
	padding: 8px 0 8px 12px;
	vertical-align: top;
}

.event-message-editor-interval input {
	width: 80px;
}

.messages-editor {
	width: 100%;
	max-width: 900px;
}

.messages-editor input[type="text"] {
	display: block;
	width: 600px !important;
	max-width: 100% !important;
	box-sizing: border-box;
	padding: 6px 8px;
	font-size: 14px;
}

.messages-editor div {
	margin-bottom: 10px;
}

.messages-editor label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
}

.message-input {
	display: block;
	width: 600px !important;
	max-width: 100%;
	box-sizing: border-box;
	padding: 6px 8px;
	font-size: 14px;
}
.messages-field {
	margin-bottom: 12px;
}

.messages-input-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.messages-input-wrap input {
	flex: 1;
}

.messages-reset {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	border: 1px solid #ddd;
	background: #f3f3f3;
	cursor: pointer;
	font-size: 16px;
}

.messages-reset:hover {
	background: #e5e7eb;
}

.messages-auth-block {
	margin-top: 12px;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fafafa;
}

.toggle-secret {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	border: 1px solid #ddd;
	background: #f3f3f3;
	cursor: pointer;
	font-size: 16px;
	flex: 0 0 auto;
}

.toggle-secret:hover {
	background: #e5e7eb;
}

	.event-config-layout {
		display: grid;
		grid-template-columns: 280px 1fr;
		gap: 24px;
	}

	.event-config-tree,
	.event-config-editor {
		background: #fff;
		border: 1px solid #ddd;
		border-radius: 6px;
		padding: 16px;
	}

	.event-config-tree-node {
		margin: 4px 0;
	}

	.event-config-tree-node a {
		display: block;
		padding: 6px 8px;
		border-radius: 4px;
		text-decoration: none;
	}

	.event-config-tree-node a.is-active {
		background: #e8f0ff;
		font-weight: bold;
	}

	.event-config-tree-children {
		margin-left: 16px;
		border-left: 1px solid #ddd;
		padding-left: 8px;
	}

	.text-muted {
		color: #777;
	}

	.step-form__row {
		display: grid;
		grid-template-columns: 220px 1fr;
		gap: 16px;
		margin-bottom: 14px;
		align-items: start;
	}

	.step-form__label {
		font-weight: bold;
		padding-top: 7px;
	}

	.step-form__input,
	.step-form__textarea {
		width: 100%;
		box-sizing: border-box;
	}

	.step-form__textarea {
		min-height: 90px;
	}

	.step-form__actions {
		margin-left: 236px;
		margin-top: 20px;
	}

	.dsl-editor__subtitle {
		margin-top: 4px;
		font-size: 12px;
		color: #777;
	}

	.dsl-editor__subtitle code {
		white-space: pre-wrap;
	}

.step-form__row.is-overridden {
	background: #f5f9ff;
	border-left: 3px solid #4a90e2;
	padding-left: 8px;
}

.dsl-editor__diff {
	font-size: 12px;
	color: #444;
	margin-top: 4px;
}

.dsl-editor__diff code {
	background: #f3f3f3;
	padding: 2px 4px;
	border-radius: 3px;
}

/* layout */
.dsl-row {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid #eee;
}

/* label */
.dsl-label {
	font-weight: 600;
	padding-top: 6px;
}

/* inputs */
.dsl-input-text {
	width: 100%;
	max-width: 600px;
}

.dsl-textarea {
	width: 100%;
	max-width: 900px;
	min-height: 80px; /* 👈 menší než předtím */
}

/* inherited hint */
.dsl-hint {
	margin-top: 4px;
	font-size: 12px;
	color: #777;
}

/* override highlight */
.dsl-row.is-overridden {
	background: #f5f9ff;
	border-left: 3px solid #4a90e2;
	padding-left: 10px;
}

.event-config-info {
	background: #f7f7f7;
	padding: 16px 20px;
	margin: 16px 0;
}

.event-config-info > div {
	margin-bottom: 8px;
}

.event-config-info > div:last-child {
	margin-bottom: 0;
}

.requirement-main-form {
	margin-bottom: 24px;
}

.dsl-select {
	width: 100%;
	max-width: 600px;
}

.ticket-row:has(.ticket-detail[open]) + .ticket-detail-row {
	display: table-row;
}

.ticket-detail-row {
	display: none;
	background: #fafcff;
}

.ticket-detail summary {
	cursor: pointer;
	font-weight: 600;
}

.ticket-detail-box {
	padding: 12px;
	background: #f8f9fb;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
}

.ticket-chat {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ticket-chat-message {
	max-width: 900px;
	padding: 10px 12px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
	text-align: left;
	margin-right: auto;
}

.ticket-chat-message--assistant {
	margin-left: 0;
}

.ticket-chat-message--customer {
	margin-left: 28px;
	background: #f9fafb;
}

.ticket-chat-message__header {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	color: #6b7280;
	font-size: 12px;
	margin-bottom: 6px;
}

.ticket-chat-message__body {
	white-space: pre-wrap;
	line-height: 1.45;
}

.ticket-message-link {
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.ticket-message-link:hover {
	opacity: 0.8;
}

.ticket-chat-message__body {
	text-align: left !important;
}

.ticket-chat-message__body a {
	text-align: left !important;
}

.ticket-evaluation {
	margin-bottom: 20px;
}

.topbar-version {
	font-size: 12px;
	opacity: 0.7;
	margin-right: 12px;
	white-space: nowrap;
	color: #6b7280;
	padding-top: 2px;
}
