* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

button {
	background-color: #1e88e5;
	border: none;
	color: #fff;
	padding: 8px 20px;
	font-size: 14px;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

button:hover {
	background: #64b5f6;
}

.site-header {
	width: 100%;
	background: #263238;
	color: #eceff1;
	padding: 0.75rem 1.5rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.site-header .controls {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.site-header label {
	color: #eceff1;
	font-weight: 500;
}

.site-header input {
	margin-left: 0.5rem;
	padding: 4px 8px;
	border: 1px solid #546e7a;
	border-radius: 4px;
	background: #37474f;
	color: #eceff1;
}

.site-header input::-webkit-file-upload-button {
	background: #546e7a;
	border: none;
	padding: 4px 8px;
	border-radius: 4px;
	color: #eceff1;
	cursor: pointer;
}

.upload-hint {
	color: #cfd8dc;
	font-size: 13px;
	font-style: italic;
}

.main-container {
	display: flex;
	flex-direction: column;
	height: calc(100vh - 60px);
	gap: 1rem;
	padding: 1rem;
	background: #f5f7fa;
}

.graph-container {
	display: flex;
	gap: 1rem;
	height: 50%;
}

.dtw-container {
	display: flex;
	gap: 1rem;
	min-height: 320px;
	max-height: 380px;
}

.dtw-panel,
.dtw-details-panel {
	border: 1px solid #cfd8dc;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	padding: 0.75rem;
}

.dtw-panel {
	flex: 2;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.dtw-details-panel {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 280px;
}

.dtw-panel-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.dtw-panel-header h3,
.dtw-details-panel h3 {
	margin-bottom: 0.35rem;
}

.dtw-panel-header p {
	color: #607d8b;
	font-size: 13px;
}

.dtw-plot {
	flex: 1;
	min-height: 250px;
}

.dtw-details-panel pre {
	flex: 1;
	overflow-y: auto;
	background: #ffffff;
	padding: 10px;
	margin: 0;
	font-size: 13px;
	font-family: monospace;
	white-space: pre-wrap;
	word-break: break-word;
}

.density-chart {
	width: 49%;
	height: 100%;
	border: 1px solid #cfd8dc;
	border-radius: 8px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
	background: #fff;
}

.density-chart button {
	font-size: 10px;
}

.small-graph-container {
	gap: 1rem;
	justify-content: space-around;
}

.small-graph-container>div {
	flex: 1;
	border: 1px solid #cfd8dc;
	border-radius: 8px;
	padding: 0.5rem;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#dtwHeatmapWrapper {
	border: 1px solid #cfd8dc;
	border-radius: 8px;
	position: relative;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.packetpreview-container {
	display: flex;
	flex: 1;
	min-height: 400px;
	max-height: 600px;
	gap: 1rem;
	margin-top: 8px;
}


/* Left panel */
.packet-preview-controller {
	/* flex: 2; */
	display: flex;
	height: 500px;
	width: 50%;
	flex-direction: column;
	border: 1px solid #cfd8dc;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	padding: 0.75rem;
}

#conversationList {
	overflow-y: auto;
}

#conversationList,
.packetList-container {
	flex: 1;
}

/* Right panel */
.packet-details-container {
	display: flex;
	flex-direction: row;
	gap: 2rem;
	width: 100%;
	max-width: 900px;
	min-width: 600px;
	height: 100%;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #cfd8dc;
	border-radius: 8px;
	padding: 1rem;
	margin-left: 1rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	font-size: 15px;
}

.details-search-panel {
	flex: 1 1 220px;
	min-width: 220px;
	max-width: 260px;
	display: flex;
	flex-direction: column;
}

.details-info-panel {
	flex: 2 1 0;
	min-width: 220px;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.details-info-panel pre {
	flex: 1;
	overflow-y: auto;
	background: #ffffff;
	padding: 10px;
	margin: 0;
	font-size: 13px;
	font-family: monospace;
	white-space: pre-wrap;
	word-break: break-word;
}

.packetmeta-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.5rem;
	font-size: 14px;
	color: #37474f;
}

.plant-uml-container {
    overflow-x: scroll !important;
    overflow-y: hidden;
    max-width: 100%;
    max-height: 500px;
    border: 1px solid #cfd8dc;
    background: #fff;
    padding: 1rem;
    position: relative;
    scrollbar-width: auto; /* For Firefox */
    scrollbar-color: #90caf9 #eceff1;
}

.plant-uml-container::-webkit-scrollbar {
    height: 12px;
    background: #eceff1;
}

.plant-uml-container::-webkit-scrollbar-thumb {
    background: #90caf9;
    border-radius: 6px;
}

.uml-zoom-controls {
    margin-left: auto;
    display: flex;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 8px;
    align-items: center;
}

#paginationControls button {
	background: #eceff1;
	color: #37474f;
}

#paginationControls button:hover {
	background: #64b5f6;
}

.packetList-container {
	flex: 1;
	overflow-y: auto;

}

.packet-filter-container,
.view-toggle {
	display: flex;
	gap: 1rem;
	margin-bottom: 0.5rem;
}

.packet-filter-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.packet-filter-container select {
	padding: 4px 8px;
	border: 1px solid #b0bec5;
	border-radius: 4px;
	background: #eceff1;
}

.packet-filter-container input[type="text"] {
  padding: 10px 14px;
  border: 1px solid #b0bec5;
  border-radius: 4px;
  background: #eceff1;
  color: #37474f;
  font-size: 18px;
  min-width: 200px;
  margin-left: 0.5rem;
}

.btn-toggle {
	background: #eceff1;
	color: #37474f;
}

.btn-toggle.active {
	background: #1e88e5;
	color: #37474f;
}

/* ---------- TABLE STYLING ---------- */
table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

th,
td {
	padding: 10px;
	border: 1px solid #e0e0e0;
}

thead th {
	background: #eceff1;
	position: sticky;
	top: 0;
	z-index: 1;
}

tr:nth-child(even) {
	background: #f9f9f9;
}

tr:hover {
	background: #e3f2fd;
}

.empty {
	text-align: center;
	color: #90a4ae;
	font-style: italic;
}

.details-value {
	width: 75%;
}

#loadingOverlay {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 9999;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	display: none;
	/* Hidden by default */
	align-items: center;
	justify-content: center;
}

.spinner {
	border: 8px solid #f3f3f3;
	border-top: 8px solid #2196f3;
	border-radius: 50%;
	width: 70px;
	height: 70px;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: 8px;
	border: 1px solid #ddd;
	text-align: left;
}

thead th {
	background: #f4f4f4;
	position: sticky;
	top: 0;
}

tr:nth-child(even) {
	background: #fafafa;
}

tr:hover {
	background: #f0f0f0;
	cursor: pointer;
}

.empty {
	color: #888;
	font-style: italic;
}

.btn-toggle {
	padding: 6px 12px;
	margin-right: 10px;
	border: 1px solid #aaa;
	background: #f4f4f4;
	cursor: pointer;
}

.btn-toggle.active {
	background: #d0ebff;
	font-weight: bold;
}

.granular-search-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.granular-search-fields input[type="text"] {
  padding: 8px 12px;
  border: 1px solid #b0bec5;
  border-radius: 4px;
  background: #eceff1;
  color: #37474f;
  font-size: 16px;
  min-width: 0;
  width: 100%;
}

.granular-search-fields button {
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 8px 20px;
  font-size: 14px;
}

.hidden-field {
  display: none !important;
}