:root {
	--bg: #f4f7f6;
	--surface: #ffffff;
	--surface-muted: #edf2f0;
	--text: #18211f;
	--muted: #63706c;
	--line: #dbe3e0;
	--accent: #ffcf24;
	--accent-strong: #20201d;
	--danger: #c44436;
	--success: #16805b;
	--shadow: 0 18px 45px rgba(24, 33, 31, 0.09);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font-family: Inter, Arial, sans-serif;
}

button {
	min-height: 44px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	color: var(--text);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

button:hover {
	transform: translateY(-1px);
	border-color: #b8c5c0;
}

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 72px;
	padding: 14px 28px;
	border-bottom: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: blur(12px);
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.brand-mark {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 8px;
	background: var(--accent);
	color: var(--accent-strong);
	font-size: 25px;
	font-weight: 900;
}

.brand-title {
	font-size: 18px;
	font-weight: 800;
	line-height: 1.2;
}

.brand-subtitle {
	color: var(--muted);
	font-size: 13px;
	line-height: 1.35;
}

.connection {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 34px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--muted);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

.connection-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--muted);
}

.connection.is-live .connection-dot {
	background: var(--success);
}

.connection.is-error .connection-dot {
	background: var(--danger);
}

.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 24px;
	width: min(1180px, calc(100% - 40px));
	margin: 24px auto;
}

.workspace,
.event-panel {
	min-width: 0;
}

.hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 260px;
	gap: 22px;
	align-items: stretch;
	padding: 28px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	box-shadow: var(--shadow);
}

.hero-copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}

.eyebrow {
	margin: 0 0 10px;
	color: var(--success);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0;
	text-transform: uppercase;
}

h1,
h2,
p {
	margin-top: 0;
}

h1 {
	max-width: 650px;
	margin-bottom: 12px;
	font-size: 40px;
	line-height: 1.08;
	letter-spacing: 0;
}

.hero p:last-child {
	max-width: 620px;
	margin-bottom: 0;
	color: var(--muted);
	font-size: 16px;
	line-height: 1.55;
}

.preview {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 220px;
	padding: 18px;
	overflow: hidden;
	border: 1px solid #cfd8d4;
	border-radius: 8px;
	background:
		linear-gradient(135deg, rgba(255, 207, 36, 0.9), rgba(255, 255, 255, 0.25)),
		url("./assets/yandex-card.svg") center / cover no-repeat;
}

.preview-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	padding: 6px 9px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.92);
	font-size: 12px;
	font-weight: 900;
}

.preview-image {
	width: 86px;
	height: 86px;
	margin-bottom: 18px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.84);
	background-position: center;
	background-size: cover;
	box-shadow: inset 0 0 0 1px rgba(24, 33, 31, 0.1);
}

.preview-line {
	width: 62%;
	height: 12px;
	margin-top: 9px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.82);
}

.preview-line.wide {
	width: 100%;
}

.status-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin-top: 18px;
}

.status-panel {
	min-width: 0;
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
}

.panel-label {
	margin-bottom: 8px;
	color: var(--muted);
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
}

.panel-value {
	overflow: hidden;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	margin-top: 18px;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--line);
}

.product-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	min-width: 0;
	padding: 16px 18px;
	background: var(--surface);
}

.product-row span {
	color: var(--muted);
	font-size: 13px;
	font-weight: 800;
}

.product-row strong {
	overflow: hidden;
	text-align: right;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-top: 18px;
}

.primary-action {
	border-color: #e0b700;
	background: var(--accent);
	color: var(--accent-strong);
}

.event-panel {
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 120px);
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	box-shadow: var(--shadow);
}

.event-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px;
	border-bottom: 1px solid var(--line);
}

.event-header h2 {
	margin: 0;
	font-size: 18px;
}

.event-header button {
	min-height: 34px;
	padding: 0 12px;
	font-size: 13px;
}

.event-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 16px 18px 18px;
	overflow: auto;
	list-style: none;
}

.event-item {
	padding: 12px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface-muted);
}

.event-name {
	margin-bottom: 4px;
	font-weight: 800;
}

.event-meta {
	color: var(--muted);
	font-size: 12px;
	line-height: 1.45;
	word-break: break-word;
}

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

	.event-panel {
		max-height: none;
	}
}

@media (max-width: 640px) {
	.topbar {
		align-items: flex-start;
		flex-direction: column;
		padding: 14px 16px;
	}

	.layout {
		width: calc(100% - 24px);
		margin: 12px auto;
	}

	.hero,
	.status-grid,
	.product-grid,
	.actions {
		grid-template-columns: 1fr;
	}

	.hero {
		padding: 18px;
	}

	h1 {
		font-size: 30px;
	}
}
