* {
	box-sizing: border-box;
}

:root {
	--bg: #f4f6f9;
	--panel: #ffffff;
	--panel-soft: #f8fafc;
	--line: #e7edf5;
	--text: #151b2d;
	--muted: #6b7487;
	--sidebar: #172238;
	--sidebar-soft: #22304a;
	--primary: #ff7a1a;
	--primary-dark: #e96200;
	--blue: #2563eb;
	--green: #0f8f5f;
	--red: #dc2626;
	--amber: #b45309;
	--shadow: 0 22px 55px rgba(31, 41, 55, .08);
}

body {
	background:
		radial-gradient(circle at top left, rgba(255, 122, 26, .08), transparent 30%),
		var(--bg);
	color: var(--text);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	margin: 0;
}

.nav-toggle,
.mobile-menu-button,
.mobile-close {
	display: none;
}

.app-shell {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	min-height: 100vh;
}

.sidebar {
	background: linear-gradient(180deg, var(--sidebar), #111827);
	color: #fff;
	display: flex;
	flex-direction: column;
	gap: 26px;
	padding: 24px 18px;
	position: sticky;
	top: 0;
	height: 100vh;
}

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

.brand span {
	align-items: center;
	background: var(--primary);
	border-radius: 10px;
	display: inline-flex;
	font-size: 13px;
	font-weight: 900;
	height: 38px;
	justify-content: center;
	width: 38px;
}

.brand strong,
.brand small {
	display: block;
}

.brand small {
	color: #a8b3c7;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.sidebar nav {
	display: grid;
	gap: 6px;
}

.sidebar nav a,
.logout-link {
	align-items: center;
	border-radius: 8px;
	color: #c7d1e2;
	display: flex;
	font-size: 14px;
	font-weight: 800;
	min-height: 42px;
	padding: 10px 12px;
	text-decoration: none;
}

.sidebar nav a:hover,
.logout-link:hover {
	background: var(--sidebar-soft);
	color: #fff;
}

.sidebar nav a.active {
	background: var(--primary);
	color: #fff;
}

.logout-link {
	margin-top: auto;
}

.nav-icon {
	border: 2px solid currentColor;
	border-radius: 5px;
	display: inline-flex;
	flex: 0 0 auto;
	height: 18px;
	margin-right: 10px;
	position: relative;
	width: 18px;
}

.nav-icon::before,
.nav-icon::after {
	background: currentColor;
	content: "";
	position: absolute;
}

.nav-icon-dashboard::before {
	height: 2px;
	left: 3px;
	top: 5px;
	width: 8px;
}

.nav-icon-dashboard::after {
	height: 5px;
	left: 3px;
	top: 9px;
	width: 5px;
}

.nav-icon-plans::before {
	height: 10px;
	left: 4px;
	top: 2px;
	width: 2px;
}

.nav-icon-plans::after {
	height: 2px;
	right: 3px;
	top: 5px;
	width: 6px;
}

.nav-icon-licenses::before {
	border-radius: 999px;
	height: 5px;
	left: 4px;
	top: 4px;
	width: 5px;
}

.nav-icon-licenses::after {
	height: 2px;
	right: 3px;
	top: 7px;
	width: 6px;
}

.nav-icon-installations::before {
	height: 8px;
	left: 5px;
	top: 3px;
	width: 2px;
}

.nav-icon-installations::after {
	height: 2px;
	right: 4px;
	top: 10px;
	width: 6px;
}

.nav-icon-releases::before {
	height: 7px;
	left: 4px;
	top: 4px;
	width: 2px;
}

.nav-icon-releases::after {
	height: 2px;
	right: 4px;
	top: 7px;
	width: 6px;
}

.nav-icon-webhooks::before {
	height: 2px;
	left: 3px;
	top: 7px;
	width: 10px;
}

.nav-icon-webhooks::after {
	border-radius: 999px;
	height: 4px;
	right: 2px;
	top: 6px;
	width: 4px;
}

.nav-icon-logs::before {
	height: 2px;
	left: 4px;
	top: 5px;
	width: 8px;
}

.nav-icon-logs::after {
	height: 2px;
	left: 4px;
	top: 10px;
	width: 8px;
}

.nav-icon-security::before {
	border-radius: 999px 999px 0 0;
	height: 6px;
	left: 4px;
	top: 2px;
	width: 6px;
}

.nav-icon-security::after {
	height: 5px;
	left: 5px;
	top: 8px;
	width: 6px;
}

.nav-icon-logout::before {
	height: 2px;
	left: 3px;
	top: 7px;
	width: 9px;
}

.nav-icon-logout::after {
	border: solid currentColor;
	border-width: 2px 2px 0 0;
	background: transparent;
	height: 5px;
	right: 2px;
	top: 5px;
	transform: rotate(45deg);
	width: 5px;
}

.workspace {
	min-width: 0;
	padding: 24px;
}

.topbar {
	align-items: center;
	background: rgba(255, 255, 255, .82);
	border: 1px solid rgba(231, 237, 245, .92);
	border-radius: 16px;
	box-shadow: var(--shadow);
	display: flex;
	justify-content: space-between;
	margin-bottom: 22px;
	padding: 18px 20px;
	position: sticky;
	top: 16px;
	z-index: 5;
	backdrop-filter: blur(14px);
}

.eyebrow {
	color: var(--muted);
	display: block;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: .08em;
	text-transform: uppercase;
}

h1 {
	font-size: 26px;
	line-height: 1.15;
	margin: 4px 0 0;
}

h2 {
	font-size: 17px;
	margin: 0 0 14px;
}

.topbar-actions {
	align-items: center;
	display: flex;
	gap: 10px;
}

.status-dot {
	background: #ecfdf3;
	border: 1px solid #bbf7d0;
	border-radius: 999px;
	color: var(--green);
	font-size: 12px;
	font-weight: 900;
	padding: 7px 10px;
}

.avatar {
	align-items: center;
	background: var(--primary);
	border-radius: 999px;
	color: #fff;
	display: inline-flex;
	font-size: 12px;
	font-weight: 900;
	height: 34px;
	justify-content: center;
	width: 34px;
}

main {
	min-width: 0;
}

.grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.panel {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 14px;
	box-shadow: var(--shadow);
	padding: 18px;
}

.card {
	min-height: 126px;
	position: relative;
	overflow: hidden;
}

.card::after {
	background: rgba(255, 122, 26, .08);
	border-radius: 50%;
	bottom: -34px;
	content: "";
	height: 88px;
	position: absolute;
	right: -22px;
	width: 88px;
}

.card span {
	color: var(--muted);
	display: block;
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
}

.card strong {
	display: block;
	font-size: 34px;
	line-height: 1;
	margin-top: 16px;
}

.panel + .panel,
.grid + .panel,
.panel + .grid {
	margin-top: 18px;
}

form {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-bottom: 4px;
}

form.login {
	grid-template-columns: 1fr;
	max-width: none;
}

input,
select,
textarea,
button,
.button {
	border: 1px solid #dfe6f0;
	border-radius: 9px;
	font: inherit;
	min-height: 42px;
	padding: 9px 12px;
}

input,
select,
textarea {
	background: #fff;
	color: var(--text);
	min-width: 0;
	width: 100%;
}

textarea {
	grid-column: 1 / -1;
	min-height: 104px;
	resize: vertical;
}

button,
.button {
	align-items: center;
	background: var(--blue);
	border-color: var(--blue);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-weight: 900;
	justify-content: center;
	text-decoration: none;
	white-space: nowrap;
}

button:hover,
.button:hover {
	filter: brightness(.97);
}

.ghost {
	background: #fff;
	border-color: #dfe6f0;
	color: var(--text);
}

.warning {
	background: var(--amber);
	border-color: var(--amber);
	color: #fff;
}

.danger {
	background: var(--red);
	border-color: var(--red);
	color: #fff;
}

table {
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
}

th,
td {
	border-bottom: 1px solid #edf2f7;
	font-size: 13px;
	padding: 13px 12px;
	text-align: left;
	vertical-align: top;
	word-break: break-word;
}

th {
	background: #f8fafc;
	color: var(--muted);
	font-size: 11px;
	font-weight: 900;
	text-transform: uppercase;
}

tr:last-child td {
	border-bottom: 0;
}

.error {
	background: #fff1f0;
	border-left: 4px solid var(--red);
	border-radius: 8px;
	padding: 12px;
}

.danger-panel {
	border-color: #fecaca;
}

.danger-panel h2 {
	color: #991b1b;
}

.muted {
	color: var(--muted);
}

.summary-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: 22px;
}

.summary-item {
	background: var(--panel-soft);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 14px;
}

.summary-item span {
	color: var(--muted);
	display: block;
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
}

.summary-item strong {
	display: block;
	font-size: 22px;
	margin-top: 6px;
	word-break: break-word;
}

.details {
	display: grid;
	gap: 10px 18px;
	grid-template-columns: 170px minmax(0, 1fr);
	margin: 0;
}

.details dt {
	color: var(--muted);
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
}

.details dd {
	margin: 0;
	word-break: break-word;
}

.detail-actions,
.row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.detail-actions {
	margin-bottom: 18px;
}

.payload-view {
	background: #101827;
	border-radius: 12px;
	color: #dbeafe;
	font-size: 12px;
	line-height: 1.55;
	margin: 0;
	max-height: 620px;
	overflow: auto;
	padding: 16px;
	white-space: pre-wrap;
	word-break: break-word;
}

.inline-form {
	display: inline-flex;
	gap: 0;
	grid-template-columns: none;
	margin: 0;
}

.inline-form button {
	min-height: 36px;
	padding: 7px 10px;
}

.pagination {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-top: 16px;
}

.pagination-count {
	color: var(--muted);
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
}

.pagination-pages {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.pagination a,
.pagination .current {
	align-items: center;
	background: #fff;
	border: 1px solid #dfe6f0;
	border-radius: 9px;
	color: var(--text);
	display: inline-flex;
	font-size: 13px;
	font-weight: 900;
	min-height: 38px;
	min-width: 38px;
	justify-content: center;
	padding: 8px 12px;
	text-decoration: none;
}

.pagination .current {
	background: var(--blue);
	border-color: var(--blue);
	color: #fff;
}

.auth-body,
.install-body {
	background:
		radial-gradient(circle at 20% 15%, rgba(255, 122, 26, .12), transparent 32%),
		#eef2f7;
}

.auth-main,
.install-main {
	align-items: center;
	display: flex;
	justify-content: center;
	margin: 0;
	min-height: 100vh;
	padding: 24px;
}

.install-main {
	display: block;
	margin: 0 auto;
	max-width: 780px;
	min-height: auto;
	padding: 44px 18px;
}

.auth-panel {
	max-width: 430px;
	width: 100%;
}

.auth-panel h1,
.install-main h1 {
	margin-bottom: 8px;
	text-align: center;
}

.auth-panel p {
	color: var(--muted);
	margin-top: 0;
}

.install-panel h2 {
	margin-top: 0;
}

.step {
	color: var(--muted);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: .06em;
	margin: 0 0 8px;
	text-transform: uppercase;
}

.install-form {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.install-form label {
	color: #4d5668;
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
}

.install-form label input {
	margin-top: 7px;
}

.install-form button {
	grid-column: 1 / -1;
}

@media (max-width: 1180px) {
	.app-shell {
		grid-template-columns: 220px minmax(0, 1fr);
	}

	.sidebar {
		padding: 20px 14px;
	}

	.workspace {
		padding: 18px;
	}

	form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	.app-shell {
		display: block;
	}

	.sidebar {
		border-radius: 0 18px 18px 0;
		box-shadow: 24px 0 50px rgba(15, 23, 42, .24);
		height: 100vh;
		left: 0;
		max-width: 330px;
		overflow-y: auto;
		position: fixed;
		top: 0;
		transform: translateX(-108%);
		transition: transform .22s ease;
		width: 84vw;
		z-index: 30;
	}

	.nav-toggle:checked + .app-shell .sidebar {
		transform: translateX(0);
	}

	.nav-toggle:checked + .app-shell::before {
		background: rgba(15, 23, 42, .48);
		content: "";
		inset: 0;
		position: fixed;
		z-index: 20;
	}

	.mobile-menu-button {
		align-items: center;
		background: #fff;
		border: 1px solid #dfe6f0;
		border-radius: 10px;
		cursor: pointer;
		display: inline-flex;
		flex: 0 0 auto;
		flex-direction: column;
		gap: 4px;
		height: 42px;
		justify-content: center;
		width: 42px;
	}

	.mobile-menu-button span {
		background: var(--text);
		border-radius: 99px;
		display: block;
		height: 2px;
		width: 18px;
	}

	.mobile-close {
		align-items: center;
		background: rgba(255, 255, 255, .08);
		border: 1px solid rgba(255, 255, 255, .14);
		border-radius: 10px;
		color: #fff;
		cursor: pointer;
		display: inline-flex;
		font-size: 24px;
		font-weight: 800;
		height: 38px;
		justify-content: center;
		margin-left: auto;
		width: 38px;
	}

	.sidebar nav {
		grid-template-columns: 1fr;
	}

	.logout-link {
		margin-top: 0;
	}

	.workspace {
		padding: 14px;
	}

	.topbar {
		align-items: center;
		border-radius: 14px;
		gap: 12px;
		justify-content: flex-start;
		position: static;
	}

	.topbar-actions {
		margin-left: auto;
	}

	.grid,
	.summary-grid,
	form,
	.install-form {
		grid-template-columns: 1fr;
	}

	.details {
		grid-template-columns: 1fr;
	}

	table,
	thead,
	tbody,
	tr,
	th,
	td {
		display: block;
	}

	thead {
		display: none;
	}

	tr {
		background: #fff;
		border: 1px solid var(--line);
		border-radius: 12px;
		margin-bottom: 12px;
		overflow: hidden;
	}

	td {
		align-items: flex-start;
		border-bottom: 1px solid #edf2f7;
		display: grid;
		gap: 10px;
		grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
	}

	td::before {
		color: var(--muted);
		content: attr(data-label);
		font-size: 11px;
		font-weight: 900;
		text-transform: uppercase;
	}

	td:last-child {
		border-bottom: 0;
	}

	.row-actions,
	.detail-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.row-actions .button,
	.row-actions form,
	.row-actions button,
	.detail-actions .button,
	.detail-actions form,
	.detail-actions button {
		width: 100%;
	}

	.pagination {
		align-items: stretch;
		flex-direction: column;
	}

	.pagination-pages {
		justify-content: flex-start;
	}
}

@media (max-width: 520px) {
	.brand {
		align-items: flex-start;
	}

	.sidebar nav {
		grid-template-columns: 1fr;
	}

	.topbar-actions {
		display: none;
	}

	h1 {
		font-size: 22px;
	}

	.card strong {
		font-size: 30px;
	}

	.panel,
	.card,
	.topbar {
		padding: 14px;
	}

	td {
		grid-template-columns: 1fr;
	}
}
