/* Shared dashboard and profile-navigation structure.
   Theme stylesheets own color, borders, shadows, and typography. */

.channel-dashboard-page {
	padding-bottom: 70px;
}

.channel-dashboard-page > .flex-container,
.channel-dashboard-page > .channel-dashboard-titlebar {
	width: 100%;
	max-width: none;
}

.channel-dashboard-titlebar {
	width: 100%;
	min-height: 80px;
	height: auto;
}

.home-dashboard-titlebar {
	margin-bottom: 0;
}

.channel-dashboard-titlebar h1,
.channel-dashboard-titlebar p {
	margin: 0;
}

.channel-dashboard-layout {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	overflow: visible;
}

.channel-dashboard-sidebar {
	position: sticky;
	top: 14px;
	flex: 0 0 280px;
	width: 280px;
	height: calc(78vh + 50px);
	max-height: calc(100vh - 28px);
	padding: 15px;
	overflow-y: auto;
}

.channel-dashboard-content {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	height: calc(78vh + 50px);
	min-height: 640px;
	padding: 15px;
	overflow: auto;
}

.channel-page .channel-dashboard-layout {
	align-items: flex-start;
	overflow: visible;
}

.channel-page .channel-dashboard-content,
.channel-page .channel-container {
	height: auto;
	min-height: 0;
	max-height: none;
	overflow: visible;
}

.channel-dashboard-content .profile-panel {
	max-width: none;
	margin: 0 0 18px;
}

.dashboard-auth-strip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
	padding: 10px 12px;
}

.dashboard-auth-strip > span {
	white-space: nowrap;
}

.dashboard-auth-strip > div {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
}

.dashboard-auth-strip a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 36px;
	padding: 7px 11px;
	text-decoration: none;
}

.dashboard-auth-strip img {
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.dashboard-auth-panel .dashboard-auth-strip {
	margin-bottom: 0;
}

.channel-dashboard-brand {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 11px;
	margin-bottom: 10px;
	padding: 8px 8px 15px;
}

.channel-dashboard-tabs img,
.channel-dashboard-tools img,
.channel-dashboard-card-icon img {
	width: 22px;
	height: 22px;
}

.channel-dashboard-tabs img.channel-dashboard-avatar-icon {
	width: 26px;
	height: 26px;
	object-fit: cover;
}

.channel-dashboard-card-copy {
	display: grid;
	min-width: 0;
}

.channel-dashboard-brand > strong,
.channel-dashboard-rank {
	flex: 1 0 100%;
}

.channel-dashboard-tabs,
.channel-dashboard-tab-group,
.channel-dashboard-tab-group > div,
.channel-dashboard-tools,
.guest-dashboard-list {
	display: grid;
	gap: 4px;
}

.channel-dashboard-tabs button,
.channel-dashboard-tabs a,
.channel-dashboard-tab-group summary {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr) auto;
	align-items: center;
	gap: 7px;
	width: 100%;
	min-height: 36px;
	padding: 7px 11px;
	text-align: left;
	text-decoration: none;
}

.channel-dashboard-tab-group summary {
	list-style: none;
}

.channel-dashboard-tab-group summary::-webkit-details-marker {
	display: none;
}

.channel-dashboard-tab-group summary::after {
	content: ">";
	transition: transform 0.18s ease;
}

.channel-dashboard-tab-group[open] summary::after {
	transform: rotate(90deg);
}

.channel-dashboard-tab-group > div {
	padding-left: 18px;
}

.channel-dashboard-tools {
	margin-top: 14px;
	padding-top: 13px;
}

.channel-dashboard-tools > span {
	padding: 0 8px 4px;
}

.channel-dashboard-tools a,
.channel-dashboard-tools .channel-dashboard-tab-group summary {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) auto;
	align-items: center;
	gap: 9px;
	min-height: 40px;
	padding: 8px 10px;
	text-decoration: none;
}

.channel-dashboard-tools a > span,
.channel-dashboard-tools .channel-dashboard-tab-group summary > span {
	min-width: 0;
	overflow-wrap: anywhere;
}

.channel-dashboard-tool-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	min-width: 22px;
	min-height: 22px;
	padding: 2px 7px;
}

.channel-dashboard-tool-badge i {
	width: 8px;
	height: 8px;
}

.guest-dashboard-activity {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 18px;
}

.guest-dashboard-activity > section {
	min-width: 0;
}

.guest-dashboard-list a {
	display: grid;
	gap: 4px;
	padding: 11px 12px;
	text-decoration: none;
}

.guest-dashboard-list strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

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

.channel-dashboard-card {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) auto;
	align-items: center;
	gap: 11px;
	min-height: 104px;
	padding: 14px;
	text-decoration: none;
}

.channel-dashboard-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
}

.channel-dashboard-card-copy > span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.profile-dashboard-page-nav {
	position: relative;
	z-index: 30;
	width: 100%;
	margin: 0 0 18px;
	padding: 10px 18px;
}

.profile-dashboard-page-nav-links {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	justify-content: safe center;
	width: 100%;
	min-width: 0;
	overflow-x: auto;
	padding: 0 2px 4px;
	scroll-padding-inline: 2px;
	scrollbar-width: thin;
	scrollbar-gutter: stable;
}

.profile-dashboard-page-nav-links a {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
	min-height: 42px;
	padding: 7px 12px 7px 7px;
	text-decoration: none;
	white-space: nowrap;
}

.profile-dashboard-page-nav-links img {
	width: 28px;
	height: 28px;
	padding: 5px;
	object-fit: contain;
}

@media screen and (max-width: 900px) {
	.channel-dashboard-layout {
		align-items: stretch;
		flex-direction: column;
	}

	.channel-dashboard-sidebar,
	.channel-dashboard-content {
		position: static;
		width: 100%;
		height: auto;
		max-height: none;
		flex-basis: auto;
	}

	.channel-dashboard-tabs {
		display: flex;
		overflow-x: auto;
		scrollbar-width: thin;
	}

	.channel-dashboard-tabs button,
	.channel-dashboard-tabs a {
		flex: 0 0 auto;
		min-width: 132px;
	}

	.channel-dashboard-tools {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.channel-dashboard-tools > span {
		grid-column: 1 / -1;
	}
}

@media screen and (max-width: 700px) {
	.channel-dashboard-cards,
	.channel-dashboard-tools,
	.guest-dashboard-activity {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media screen and (max-width: 480px) {
	.channel-dashboard-guest-page .channel-dashboard-tabs {
		display: grid;
		overflow-x: visible;
	}

	.channel-dashboard-guest-page .channel-dashboard-tabs a {
		min-width: 0;
	}

	.dashboard-auth-strip {
		align-items: stretch;
		flex-direction: column;
	}

	.dashboard-auth-strip > div,
	.dashboard-auth-strip a {
		width: 100%;
	}

	.dashboard-auth-strip a {
		justify-content: center;
	}

	.channel-dashboard-cards,
	.channel-dashboard-tools,
	.guest-dashboard-activity {
		grid-template-columns: 1fr;
	}
}
