.player-card video {
	width: 100%;
	border-radius: var(--radius);
	background: #0b0c10;
	display: block;
}

.stats-title {
	font-size: 12.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-muted);
	margin-bottom: 16px;
}

.stats-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 18px;
}

.stat-tile {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--surface-alt);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 12px 18px;
	min-width: 200px;
	flex: 1 1 200px;
}

.stat-tile .stat-icon {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: var(--accent-soft);
	color: var(--accent);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.stat-tile .stat-icon svg {
	width: 17px;
	height: 17px;
}

.stat-tile .label {
	font-size: 12px;
	color: var(--text-muted);
	font-weight: 500;
	margin-bottom: 1px;
}

.stat-tile .value {
	font-size: 19px;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.stat-tile .value small {
	font-size: 12px;
	font-weight: 500;
	color: var(--text-muted);
}

.histogram-caption {
	font-size: 12.5px;
	color: var(--text-muted);
	margin-bottom: 8px;
}

/* Toolbar */
.toolbar {
	display: flex;
	gap: 10px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.search-box {
	position: relative;
	flex: 1 1 260px;
	min-width: 200px;
}

.search-box svg {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 15px;
	height: 15px;
	color: var(--text-muted);
	pointer-events: none;
}

.search-box input {
	width: 100%;
	height: 40px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--surface);
	padding: 0 16px 0 38px;
	font-size: 13.5px;
	font-family: inherit;
	color: var(--text);
	outline: none;
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.search-box input:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}

.segmented {
	display: inline-flex;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 3px;
	gap: 2px;
	flex-shrink: 0;
}

.segmented-btn {
	border: none;
	background: transparent;
	border-radius: 999px;
	padding: 0 14px;
	height: 34px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--text-muted);
	cursor: pointer;
	transition: background 0.12s ease, color 0.12s ease;
}

.segmented-btn:hover {
	color: var(--text);
}

.segmented-btn.active {
	background: var(--accent);
	color: #fff;
}

/* Table */
.table-wrap {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	overflow: hidden;
}

.table-scroll {
	overflow-x: auto;
}

table.video-table {
	width: 100%;
	min-width: 920px;
	border-collapse: collapse;
	margin: 0;
}

.video-table thead th {
	text-align: left;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-muted);
	background: var(--surface-alt);
	border-bottom: 1px solid var(--border);
	padding: 13px 18px;
	white-space: nowrap;
}

.video-table tbody tr {
	border-bottom: 1px solid var(--border);
	transition: background 0.12s ease;
}

.video-table tbody tr:last-child {
	border-bottom: none;
}

.video-table tbody tr:hover {
	background: var(--surface-alt);
}

.video-table tbody tr.active {
	background: var(--accent-soft);
}

.video-table td {
	padding: 12px 18px;
	vertical-align: middle;
}

.video-table td.num-cell {
	white-space: nowrap;
	color: var(--text-muted);
	font-variant-numeric: tabular-nums;
}

.video-name-cell {
	min-width: 240px;
	max-width: 340px;
}

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

.avatar {
	width: 32px;
	height: 32px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 13px;
	flex-shrink: 0;
}

.avatar-0 { background: #e8edff; color: #4457dc; }
.avatar-1 { background: #f2e9ff; color: #8250df; }
.avatar-2 { background: #e3f9ee; color: #1e9e63; }
.avatar-3 { background: #fff1e0; color: #c2670f; }
.avatar-4 { background: #ffe9f0; color: #d6336c; }
.avatar-5 { background: #e3f4fb; color: #1075a8; }

.video-table tr.active .avatar {
	box-shadow: 0 0 0 2px var(--accent);
}

.video-name-link {
	text-decoration: none;
	color: var(--text);
	font-weight: 600;
	min-width: 0;
}

.video-table tr.active .video-name-link {
	color: var(--accent);
}

.video-name {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 220px;
}

.video-name-input {
	max-width: 200px;
}

.video-meta select,
.video-meta input {
	max-width: 110px;
}

.meta-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.badge-pill {
	display: inline-flex;
	align-items: center;
	font-size: 11.5px;
	font-weight: 600;
	padding: 3px 9px;
	border-radius: 999px;
	white-space: nowrap;
}

.badge-geo { background: #e8edff; color: #4457dc; }
.badge-offer { background: #f2e9ff; color: #8250df; }
.badge-niche { background: #e3f9ee; color: #1e9e63; }

.edit-meta-btn {
	display: inline-block;
	margin-top: 6px;
	font-size: 11.5px;
	font-weight: 600;
	text-decoration: none;
	color: var(--text-muted);
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
}

.edit-meta-btn:hover {
	color: var(--accent);
}

.completion-cell {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 160px;
}

.completion-bar {
	flex: 1 1 auto;
	height: 6px;
	border-radius: 999px;
	background: var(--border);
	overflow: hidden;
	min-width: 60px;
}

.completion-fill {
	height: 100%;
	background: var(--accent);
	border-radius: 999px;
}

.completion-text {
	font-size: 12px;
	color: var(--text-muted);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.actions-cell {
	display: flex;
	align-items: center;
	gap: 6px;
	justify-content: flex-end;
	white-space: nowrap;
}

.empty-state {
	padding: 56px 16px;
	text-align: center;
	color: var(--text-muted);
}

.empty-state svg {
	margin-bottom: 10px;
	color: #c7c9dc;
}

/* Segment histogram */
.segment-histogram {
	--viz-bar: #5a6cf0;
	--viz-bar-hover: #4657dc;
	--viz-gridline: #edeef7;
	--viz-axis: #d9dbe9;
	--viz-muted: #9a9db0;
	display: flex;
	align-items: stretch;
}

.segment-histogram-yaxis {
	flex: none;
}

.segment-histogram-scroll {
	flex: 1 1 auto;
	overflow-x: auto;
	overflow-y: hidden;
}

.segment-histogram-yaxis svg,
.segment-histogram-scroll svg {
	display: block;
}

.segment-tooltip {
	position: fixed;
	z-index: 20;
	pointer-events: none;
	background: #181a29;
	color: #fff;
	font-size: 12px;
	line-height: 1.3;
	padding: 4px 8px;
	border-radius: 6px;
	display: none;
	white-space: nowrap;
}

.segment-tooltip strong {
	font-size: 13px;
}
